keep-n-first

1.0.1 • Public • Published

keep-n-first

Maintain a sorted list of n smallest elements

KeepNFirst = require "./KeepNFirst"
o = new KeepNFirst(3)
o.add(10).add(9).add(8).add(7).add(6).values
-> [ 6, 7, 8 ]

Readme

Keywords

Package Sidebar

Install

npm i keep-n-first

Weekly Downloads

1

Version

1.0.1

License

GPL-3.0

Unpacked Size

22.1 kB

Total Files

7

Last publish

Collaborators

  • fraczak