mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
update
This commit is contained in:
parent
36ed283faf
commit
034e67daff
@ -327,6 +327,14 @@ global.parse_name = function(name, type){
|
||||
}).toLowerCase();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 判断是否是个promise
|
||||
* @param {[type]} obj [description]
|
||||
* @return {Boolean} [description]
|
||||
*/
|
||||
global.is_promise = function(obj){
|
||||
return when.isPromise(obj);
|
||||
}
|
||||
/**
|
||||
* 生成一个promise,如果传入的参数是promise则直接返回
|
||||
* @param {[type]} obj [description]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user