function memoizeJ(fn, cache = /* @__PURE__ */ Object.create(null)) {
  return (...args) => {
    const key = JSON.stringify(args);
    if (key !== void 0) {
      return key in cache ? cache[key] : cache[key] = fn.apply(null, args);
    }
    return fn.apply(null, args);
  };
}
export {
  memoizeJ
};
