Skip to content

Instantly share code, notes, and snippets.

@DimaDaxDadeco
Last active February 11, 2019 17:45
Show Gist options
  • Save DimaDaxDadeco/75e51210f97277a9ff28577e3f9da040 to your computer and use it in GitHub Desktop.
Save DimaDaxDadeco/75e51210f97277a9ff28577e3f9da040 to your computer and use it in GitHub Desktop.
if (typeof Object.create !== 'function') {
Object.create = function(o, props) {
function F() {}
F.prototype = o;
if (typeof(props) === "object") {
for (prop in props) {
if (props.hasOwnProperty((prop))) {
F[prop] = props[prop];
}
}
}
return new F();
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment