1.0.3 • Published 7 years ago

n-q v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

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]
1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago