0.0.8 • Published 12 years ago

strict-method v0.0.8

Weekly downloads
3
License
-
Repository
github
Last release
12 years ago

strictmethod

strict method

example

 var m = require("strict-method");

 var user = {
    _name:"leo",
    _age:22,
    change:m(String,{min:5},Number,function(name,age){
        this._name = name;
        this._age = age;
    })
 }

 user.change("brighthas",28); // not error.

 user.change("bri",28);  // throw error! must min > 5

install

0.0.8

12 years ago

0.0.7

12 years ago

0.0.6

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago