Skip to content

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

License

Notifications You must be signed in to change notification settings

christensson/weak-value-map

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 72.4%
  • JavaScript 25.7%
  • Python 1.9%