weakvaluemap
A collection of key/value pairs in which the values are weakly referenced.
Last updated 7 years ago by kriszyp .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install weakvaluemap 
SYNC missed versions from official npm registry.

weak-value-map

A collection of key/value pairs in which the values are weakly referenced.

Install

$ npm install weak-value-map

Usage

Initialization

'use strict';
var WeakValueMap = require('weak-value-map');

var map = new WeakValueMap();

Insertion / Deletion

map.set(1, "abcd")
   .set(2, "efg")
   .set(3, "hijk");

map.delete(2);

Retrieval

map.get(1);
// => "abcd"

map.get(2);
// => undefined

map.get(3);
// => "hijk"

##License

MIT

Current Tags

  • 0.3.2                                ...           latest (6 years ago)

6 Versions

  • 0.3.2                                ...           6 years ago
  • 0.3.1                                ...           6 years ago
  • 0.3.0                                ...           7 years ago
  • 0.2.3                                ...           7 years ago
  • 0.2.2                                ...           7 years ago
  • 0.2.1                                ...           7 years ago
Maintainers (1)
Downloads
Total 5
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE