Created
February 8, 2016 13:28
-
-
Save btakita/3398e70c18b0128e6722 to your computer and use it in GitHub Desktop.
prototypeSmash - assign Object.getPrototypeOf(obj), obj
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
export default function prototypeSmash(obj) { | |
return Object.assign.apply(Object, [{}].concat(Object.getPrototypeOf(obj), obj)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment