-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
for (fn in debugMap) {
Debug.prototype[fn] = (function(fn) {
return function() {
var msg;
if(arguments.length==1){
msg=arguments[0];
}else{
msg=[].slice.apply(arguments);
}
this.fn = fn;
this.msg = render(msg);
this.color = debugMap[fn];
return this.print();
};
})(fn);
}这样就可以使用debug.log(1,2,3,4);
Metadata
Metadata
Assignees
Labels
No labels