mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
refactor(util) extendProto
This commit is contained in:
parent
59dac1fe5b
commit
454b51aa98
1 changed files with 7 additions and 8 deletions
15
lib/util.js
15
lib/util.js
|
|
@ -225,17 +225,16 @@
|
|||
};
|
||||
|
||||
/**
|
||||
* copy pObj properties to pTargetObject
|
||||
* extend proto
|
||||
*
|
||||
* @pTarget
|
||||
* @pObj
|
||||
* @obj
|
||||
*/
|
||||
this.extendProto = function(pObj) {
|
||||
var lRet, F = function() {};
|
||||
F.prototype = Util.extend({}, pObj);
|
||||
lRet = new F();
|
||||
this.extendProto = function(obj) {
|
||||
var ret, F = function() {};
|
||||
F.prototype = Util.extend({}, obj);
|
||||
ret = new F();
|
||||
|
||||
return lRet;
|
||||
return ret;
|
||||
};
|
||||
|
||||
/** for function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue