Quantumbraid's picture
download
raw
248 Bytes
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]
}
}

Xet Storage Details

Size:
248 Bytes
·
Xet hash:
1bb3b954a8a01519d40bf1442256c7d7e34cd3e9b1d3120a810bfb045319265c

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.