update packaged ace
This commit is contained in:
parent
b04fa9fd9e
commit
2d45f9d5b5
4 changed files with 19 additions and 3 deletions
|
|
@ -3417,6 +3417,22 @@ exports.copyArray = function(array){
|
|||
return copy;
|
||||
};
|
||||
|
||||
exports.deepCopy = function (obj) {
|
||||
if (typeof obj[key] != "object") {
|
||||
return obj;
|
||||
}
|
||||
|
||||
var copy = obj.constructor();
|
||||
for (var key in obj) {
|
||||
if (typeof obj[key] == "object") {
|
||||
copy[key] = this.deepCopy(obj[key]);
|
||||
} else {
|
||||
copy[key] = obj[key];
|
||||
}
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
exports.arrayToMap = function(arr) {
|
||||
var map = {};
|
||||
for (var i=0; i<arr.length; i++) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue