Viewing File: /home/ubuntu/route-and-root-frontend-base/node_modules/@emotion/memoize/src/index.js

// @flow

export default function memoize<V>(fn: string => V): string => V {
  const cache = {}

  return (arg: string) => {
    if (cache[arg] === undefined) cache[arg] = fn(arg)
    return cache[arg]
  }
}
Back to Directory File Manager