Create a gist now

Instantly share code, notes, and snippets.

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