Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created December 9, 2011 15:39
Show Gist options
  • Save Raynos/1452024 to your computer and use it in GitHub Desktop.
Save Raynos/1452024 to your computer and use it in GitHub Desktop.
function clone(o) {
return Object.create(
Object.getPrototypeOf(o),
Object.getOwnPropertyDescriptors(o)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment