Created
May 11, 2016 15:47
-
-
Save dskecse/2db57dcba0ff27305daa54eb3f42a6b1 to your computer and use it in GitHub Desktop.
extend function (aka augment)
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 characters
function extend(destination, source) { | |
for (var meth in source) { | |
if (source.hasOwnProperty(meth)) { | |
destination[meth] = source[meth]; | |
} | |
} | |
return destination; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment