UNPKG

graphql

Version:

A Query Language and Runtime which can target any service.

13 lines 342 B
export function memoize1(fn) { let cache0; return function memoized(a1) { cache0 ??= new WeakMap(); let fnResult = cache0.get(a1); if (fnResult === undefined) { fnResult = fn(a1); cache0.set(a1, fnResult); } return fnResult; }; } //# sourceMappingURL=memoize1.js.map