Skip to content

Instantly share code, notes, and snippets.

@dskecse
Created May 11, 2016 15:47
Show Gist options
  • Save dskecse/2db57dcba0ff27305daa54eb3f42a6b1 to your computer and use it in GitHub Desktop.
Save dskecse/2db57dcba0ff27305daa54eb3f42a6b1 to your computer and use it in GitHub Desktop.
extend function (aka augment)
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