Created
November 5, 2015 10:27
-
-
Save ironboy/694a88787d4428c6d89e to your computer and use it in GitHub Desktop.
This file contains 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
Object.slice = function(){ | |
var | |
args = [].slice.call(arguments), | |
obj = args.shift(), | |
obj2 = {}, | |
keys = Object.keys(obj); | |
keys.slice.apply(keys,args).forEach(function(x){ | |
obj2[x] = obj[x]; | |
}); | |
return obj2; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment