Skip to content

Instantly share code, notes, and snippets.

@btakita
Created February 8, 2016 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btakita/3398e70c18b0128e6722 to your computer and use it in GitHub Desktop.
Save btakita/3398e70c18b0128e6722 to your computer and use it in GitHub Desktop.
prototypeSmash - assign Object.getPrototypeOf(obj), obj
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