这个api在kissy以及YUI都是相似的
?
?
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;
}
?
?
?
?