mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +00:00 
			
		
		
		
	Added extend() utility function
This commit is contained in:
		| @@ -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)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston