Socket
Book a DemoInstallSign in
Socket

ordered-dict

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ordered-dict

An ordered traversable dictionary with mutable ordering (from meteor.js)

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

ordered-dict

An ordered traversable dictionary with mutable ordering (from meteor.js). It is implemented as a dictionary that contains nodes of a doubly linked list as its values.

Build Status Dependency Status NPM version

Installation

npm install ordered-dict

Usage

var OrderedDict = require('ordered-dict');
var dict = new OrderedDict();

dict.append('a', '1');
dict.append('b', '2');
dict.putBefore('c', '3', 'b');
assert(dict.first() === 'a');
assert(dict.next('a') === 'c');
assert(dict.next('c') === 'b');
assert(dict.get('a') === '1');
assert(dict.get('c') === '3');
assert(dict.get('b') === '2');

Contributing

To get a new copy of the code, run node build.js.

License

MIT

FAQs

Package last updated on 04 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts