MCPcopy
hub / github.com/tailwindlabs/prettier-plugin-tailwindcss / remember

Function remember

src/expiring-map.ts:23–35  ·  view source on GitHub ↗
(key: K, factory: () => V)

Source from the content-addressed store, hash-verified

21 },
22
23 remember(key: K, factory: () => V) {
24 let result = map.get(key)
25
26 if (result && result.expiration > new Date()) {
27 return result.value
28 }
29
30 map.delete(key)
31
32 let value = factory()
33 this.set(key, value)
34 return value
35 },
36
37 set(key: K, value: V) {
38 let expiration = new Date()

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…