1.0.1 • Published 9 years ago
xmap v1.0.1
xmap
Extended Map, Set, WeakMap, WeakSet JavaScript functions
npm install xmap --saveFeatures
- No dependencies as used native functions
- Reverse compatibility with
Map,Set,WeakMap,WeakSetas native functions are used - Improvements in
getfunction in cases when you use objects
// Initiate
const map = new xMap()
// Set
map.set({ a: 1, b: 1 }, "#1")
map.set({ a: 1, b: 2 }, "#2")
// Get
map.get({ a: 1 }) // [ "#1", "#2" ]
map.get({ b: 2 }) // "#2"API
xMap(currently this only)xSetxWeakMapxWeakSet
Requirements for using
- Currently native support for
Map,Set,WeakSet,WeakMap - Nodejs or browser (latest versions)