-
Notifications
You must be signed in to change notification settings - Fork 862
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
103 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Hilo | ||
* Copyright 2015 alibaba.com | ||
* Licensed under the MIT License | ||
*/ | ||
|
||
/** | ||
* @language=en | ||
* @class util method set | ||
* @static | ||
* @module hilo/util/util | ||
*/ | ||
/** | ||
* @language=zh | ||
* @class 工具方法集合 | ||
* @static | ||
* @module hilo/util/util | ||
*/ | ||
var util = { | ||
/** | ||
* @language=en | ||
* Simple shallow copy objects. | ||
* @param {Object} target Target object to copy to. | ||
* @param {Object} source Source object to copy. | ||
* @param {Boolean} strict Indicates whether replication is undefined property, default is false, i.e., undefined attributes are not copied. | ||
* @returns {Object} Object after copying. | ||
*/ | ||
/** | ||
* @language=zh | ||
* 简单的浅复制对象。 | ||
* @param {Object} target 要复制的目标对象。 | ||
* @param {Object} source 要复制的源对象。 | ||
* @param {Boolean} strict 指示是否复制未定义的属性,默认为false,即不复制未定义的属性。 | ||
* @returns {Object} 复制后的对象。 | ||
*/ | ||
copy: function(target, source, strict){ | ||
for(var key in source){ | ||
if(!strict || target.hasOwnProperty(key) || target[key] !== undefined){ | ||
target[key] = source[key]; | ||
} | ||
} | ||
return target; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.