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

Function getSlot

packages/intl-segmenter/segmenter.ts:527–532  ·  view source on GitHub ↗
(
  instance: Segmenter,
  key: K
)

Source from the content-addressed store, hash-verified

525const __INTERNAL_SLOT_MAP__ = new WeakMap<Segmenter, SegmenterInternalSlots>()
526
527function getSlot<K extends keyof SegmenterInternalSlots>(
528 instance: Segmenter,
529 key: K
530): SegmenterInternalSlots[K] {
531 return getInternalSlot(__INTERNAL_SLOT_MAP__, instance, key)
532}
533
534function setSlot<K extends keyof SegmenterInternalSlots>(
535 instance: Segmenter,

Callers 1

createSegmentDataObjectFunction · 0.70

Calls 1

getInternalSlotFunction · 0.85

Tested by

no test coverage detected