Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

lru-set

0.1.0 • Public • Published

lru-set Build Status

Set implementation with lur feature for node.

Getting Started

Install the module with: npm install lru-set

var LRUSET = require('lru-set');
 
var set = LRUSET(1, 2, 3);
 
//
set.len(); // 3
set.contain(3); // true
set.contain(4); // false
 
//
set.add(3);
set.len(); // still 3
set.add(4);
set.len(); // 4
 
//
set.pop(); // 4
set.len(); // back to 3
 
set.remove(4);
set.len(); // 3
set.remove(3);
set.len(); // now is 2

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • v0.1.0, 2013/07/15

License

Copyright (c) 2013 Guan Qing Licensed under the MIT license.

Keywords

none

install

npm i lru-set

Downloadsweekly downloads

1

version

0.1.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability