这个api在kissy以及YUI,underscore都是相似的
isNull:function(o){
return o === null;
}
isUndefined:function(o){
return typeof o === 'undefined';
}
nullOrUndefined:function(o){
return isNull(o) || isUndefined(o);
}
补充一个最近在underscore的库里面看到的写法:
isUndefined = function(obj){
return obj === void 0;
}


被折叠的 条评论
为什么被折叠?



