UNPKG

@stdlib/esm

Version:

ES module distribution for Stdlib, a standard library for JavaScript and Node.js.

3 lines 878 B
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import t from"./define-property.js";function e(t){var e=typeof t;return null===t||"object"!==e&&"function"!==e?new TypeError("invalid argument. A provided constructor must be either an object (except null) or a function. Value: `"+t+"`."):null}var r=Object.create;function o(){}function n(t){return o.prototype=t,new o}var u,a=r,i=n,p=u="function"==typeof r?r:i,c=t,f=e,l=p;function y(t,e){var r=f(t);if(r)throw r;if(r=f(e))throw r;if(void 0===e.prototype)throw new TypeError("invalid argument. Second argument must have a prototype from which another object can inherit. Value: `"+e.prototype+"`.");return t.prototype=l(e.prototype),c(t.prototype,"constructor",{configurable:!0,enumerable:!1,writable:!0,value:t}),t}var v=y;export default v; //# sourceMappingURL=inherit.js.map