Package Exports
- @neumatter/slot-map
- @neumatter/slot-map/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@neumatter/slot-map) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
SlotMap
Create private fields using a SlotMap. Similar to internal slots.
Table of Contents
Install
npm i slot-mapUsage
static SlotMap.get:
Gets or creates the SlotMap for the given object.
import SlotMap from 'slot-map'
const obj = {}
const slotMap = SlotMap.get(obj)static SlotMap.set:
Sets the SlotMap for the given object.
import SlotMap from 'slot-map'
const obj = {}
SlotMap.set(obj, slotMap)static SlotMap.setInternal:
Sets a property in the SlotMap for the given object.
import SlotMap from 'slot-map'
const obj = {}
SlotMap.setInternal(obj, 'id', '01234')static SlotMap.getInternal:
Gets a property in the SlotMap for the given object.
import SlotMap from 'slot-map'
const obj = {}
SlotMap.getInternal(obj, 'id')