MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / memoize

Function memoize

packages/core/src/utils/normalize.ts:301–307  ·  view source on GitHub ↗
(obj: object)

Source from the content-addressed store, hash-verified

299function memoBuilder(): MemoFunc {
300 const inner = new WeakSet<object>();
301 function memoize(obj: object): boolean {
302 if (inner.has(obj)) {
303 return true;
304 }
305 inner.add(obj);
306 return false;
307 }
308
309 function unmemoize(obj: object): void {
310 inner.delete(obj);

Callers 1

visitFunction · 0.85

Calls 2

hasMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected