mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-19 18:14:15 +00:00
批量复制完成
This commit is contained in:
22
node_modules/common.js
generated
vendored
22
node_modules/common.js
generated
vendored
@@ -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++;
|
||||
|
Reference in New Issue
Block a user