MCPcopy
hub / github.com/formatjs/formatjs / getInternalSlots

Function getInternalSlots

packages/intl-collator/get_internal_slots.ts:8–16  ·  view source on GitHub ↗
(collator: Collator)

Source from the content-addressed store, hash-verified

6const internalSlotMap = new WeakMap<Collator, IntlCollatorInternal>()
7
8export function getInternalSlots(collator: Collator): IntlCollatorInternal {
9 const internalSlots = internalSlotMap.get(collator)
10 if (internalSlots) {
11 return internalSlots
12 }
13 const newInternalSlots: IntlCollatorInternal = Object.create(null)
14 internalSlotMap.set(collator, newInternalSlots)
15 return newInternalSlots
16}

Callers 2

core.tsFile · 0.70
getFunction · 0.70

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected