Universal ES6-compatible WeakMap wrapper
npm install weak-dictionary#Weak-Dictionary
A memory-safe dictionary implementation using the CoreJS WeakMap polyfill
- Why
- Usage
Naturally, we will need a Dictionary implementation that allows managed key tracking _without_ preventing GC in various JS runtimes.
Install:
`` javascript`
npm install weak-dictionary
Use:
` javascript``
var weakDict = require('weak-dictionary');
var dict = new weakDict();
Profit!
----
[![Build Status][travis-shield]][travis]
[![Build Status][travis-shield-develop]][travis]
[![Dependency Status][dependencies-shield]][dependencies]
[![devDependency Status][dependencies-dev-shield]][dependencies-dev]
[![yo][shield]][shield]
[npm]: https://www.npmjs.com/package/weak-dictionary
[travis]: https://travis-ci.org/deepelement/weak-dictionary
[travis-shield]: https://img.shields.io/travis/DeepElement/weak-dictionary.svg?branch=stable
[travis-shield-develop]: https://img.shields.io/travis/DeepElement/weak-dictionary.svg?branch=master
[dependencies]: https://david-dm.org/deepelement/weak-dictionary
[dependencies-dev]: https://david-dm.org/deepelement/weak-dictionary#info=devDependencies
[dependencies-shield]: https://img.shields.io/david/deepelement/weak-dictionary.svg
[dependencies-dev-shield]: https://img.shields.io/david/dev/deepelement/weak-dictionary.svg
[shield]: https://img.shields.io/npm/dm/winjsrocks.svg