PHP 8.2.30
Preview: index.ts Size: 248 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@emotion/memoize/src/index.ts

export default function memoize<V>(fn: (arg: string) => V): (arg: string) => V {
  const cache: Record<string, V> = Object.create(null)

  return (arg: string) => {
    if (cache[arg] === undefined) cache[arg] = fn(arg)
    return cache[arg]
  }
}

Directory Contents

Dirs: 0 × Files: 1

Name Size Perms Modified Actions
248 B lrw-r--r-- 2026-02-28 00:28:18
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).