Skip to content

Instantly share code, notes, and snippets.

@ironboy
Created November 5, 2015 10:27
Show Gist options
  • Save ironboy/694a88787d4428c6d89e to your computer and use it in GitHub Desktop.
Save ironboy/694a88787d4428c6d89e to your computer and use it in GitHub Desktop.
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