Created
August 15, 2011 14:37
-
-
Save Pradeek/1146881 to your computer and use it in GitHub Desktop.
Revisions
-
Pradeek revised this gist
Mar 18, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ function extend(destination, source, overwrite) { if(typeof overwrite === 'undefined') { overwrite = true; } for(var property in source) { if(source.hasOwnProperty(property)) { -
Pradeek created this gist
Aug 15, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ function extend(destination, source, overwrite) { if(typeof overwrite === 'undefined') { overwrite = false; } for(var property in source) { if(source.hasOwnProperty(property)) { if(!destination[property] || overwrite) { destination[property] = source[property]; } } } return destination; }