@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 998 B
JavaScript
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
import e from"./../assert/is-object.js";import r from"./../assert/is-function.js";import a from"./define-property.js";var t=e,o=r,i=a;function n(e,r,a){if(!t(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if(!t(a))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+a+"`.");if(!o(a.value))throw new TypeError("invalid argument. The `value` property of the property descriptor must be a function. Value: `"+a.value+"`.");function n(t){a.value=t,i(e,r,a)}a={configurable:void 0!==a.configurable&&a.configurable,enumerable:void 0!==a.enumerable&&a.enumerable,writable:void 0!==a.writable&&a.writable,value:a.value},i(e,r,{configurable:!0,enumerable:a.enumerable,get:function(){var r=a.value.call(e);return n(r),r},set:a.writable?n:void 0})}var u=n;export default u;
//# sourceMappingURL=define-memoized-property.js.map