yapool
Yet Another object pool in JavaScript
Last updated 8 years ago by isaacs .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install yapool 
SYNC missed versions from official npm registry.

yapool

Yet Another object pool in JavaScript

Because yallist is sometimes too featureful, this is a very dead-simple linked-list pool thingie in JavaScript that lets you add and remove objects in a set.

Not suitable for very long lists, because all searches are O(n), but for small n, it has very low complexity.

API

p = new Pool()

Constructor takes no arguments

p.add(someObject)

put an object in the pool

p.length

return the number of things in the pool.

p.remove(someObject)

remove that object from the pool.

Current Tags

  • 1.0.0                                ...           latest (8 years ago)

1 Versions

  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 4
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
  • tap ^9.0.3 || 10
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |