babel/lib/6to5/templates/extends.js
2014-12-14 12:19:24 +11:00

12 lines
258 B
JavaScript

(function (child, parent) {
child.prototype = Object.create(parent && parent.prototype, {
constructor: {
value: child,
enumerable: false,
writable: true,
configurable: true
}
});
if (parent) child.__proto__ = parent;
})