Version: 0.0.0.2
更改了函数重载的实现, 将原来的字符串变成了类, 扩展性更强. 见下面的MyClass.
vejis.use(vejis, true);
var test = _();
test._(Integer, function (n) {
alert(‘Integer: ‘ + n);
});test._(MyClass, function (obj) {
obj.alert();
});var obj = new MyClass();
test(18);
test(obj);function MyClass() {
this.alert = function () {
alert(‘It\’s a new Class!’);
};
}