1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-26 15:23:15 +00:00

Added extend() utility function

This commit is contained in:
Jeremy Ruston 2012-12-14 13:30:10 +00:00
parent d338a54370
commit 28f96de225

View File

@ -82,6 +82,17 @@ exports.checkDependencies = function(dependencies,changes) {
return hit;
};
exports.extend = function(object /* [, src] */) {
$tw.utils.each(Array.prototype.slice.call(arguments, 1), function(source) {
if(source) {
for(var property in source) {
object[property] = source[property];
}
}
});
return object;
};
exports.deepCopy = function(object) {
var result,t;
if($tw.utils.isArray(object)) {