Skip to content

Instantly share code, notes, and snippets.

@keblodev
Created June 1, 2015 02:35
Show Gist options
  • Select an option

  • Save keblodev/d8c27eb92328106ac2f7 to your computer and use it in GitHub Desktop.

Select an option

Save keblodev/d8c27eb92328106ac2f7 to your computer and use it in GitHub Desktop.
simple extend
//simpleExtend
var extend = function(targetObj, extendWithObj) {
'use strict';
for (var key in extendWithObj) {
if (extendWithObj.hasOwnProperty(key)) {
targetObj[key] = extendWithObj[key];
}
}
return targetObj;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment