批量复制完成

This commit is contained in:
life
2015-10-24 11:23:06 +08:00
parent 72315e35fe
commit e8af6401c0
3 changed files with 83 additions and 80 deletions

22
node_modules/common.js generated vendored
View File

@@ -26,6 +26,28 @@ var Common = {
objectId: function() {
return ObjectId()
},
// 是否是数组
isArray: function(obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
},
/**
* 是否为空
* 可判断任意类型string array
*/
isEmpty: function(obj) {
if(!obj) {
return true;
}
if(isArray(obj)) {
if(obj.length == 0) {
return true;
}
}
return false;
},
_uuid: 1,
uuid: function() {
this._uuid++;