This package has been deprecated

Author message:

Development of this module has been stopped.

n-q

1.0.3 • Public • Published

n-q Build Status js-standard-style

fixed size LRU array

Usage

Installation:

Use yarn or npm:

$ [sudo] npm install n-q --save

Example:

var Nq = require('n-q')

// create a fixed size array, the length will never change
// only the contents
var queue = new Nq(3)

queue.toArray() // [null, null, null]

queue
  .push(1) // [1, null, null]
  .push(3) // [1, 3, null]
  .push(3) // [1, 3, 3]
  .push(7) // [7, 3, 3]

queue.toArray() // => [7, 3, 3]

Readme

Keywords

Package Sidebar

Install

npm i n-q

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • roryrjb