UNPKG

ll-package

Version:

2 lines (1 loc) 492 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./_MapCache.js");var f="Expected a function";function n(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(f);var t=function(){var u=arguments,c=e?e.apply(this,u):u[0],a=t.cache;if(a.has(c))return a.get(c);var i=r.apply(this,u);return t.cache=a.set(c,i)||a,i};return t.cache=new(n.Cache||o.default),t}n.Cache=o.default;exports.default=n;