Created
June 1, 2015 02:35
-
-
Save keblodev/d8c27eb92328106ac2f7 to your computer and use it in GitHub Desktop.
simple extend
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
| //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