MCPcopy Index your code
hub / github.com/formatjs/formatjs / createFastMemoizeCache

Function createFastMemoizeCache

packages/intl-messageformat/core.ts:64–79  ·  view source on GitHub ↗
(
  store: Record<string, V | undefined>
)

Source from the content-addressed store, hash-verified

62}
63
64function createFastMemoizeCache<V>(
65 store: Record<string, V | undefined>
66): Cache<string, V> {
67 return {
68 create() {
69 return {
70 get(key) {
71 return store[key]
72 },
73 set(key, value) {
74 store[key] = value
75 },
76 }
77 },
78 }
79}
80
81function createDefaultFormatters(
82 cache: FormatterCache = {

Callers 1

createDefaultFormattersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected