New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fixedqueue

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fixedqueue

implementation of a fixed queue in javascript

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

FixedQueue

Implementation of a fixed queue in javascript. (Original concept found here: http://www.bennadel.com/blog/2308-Creating-A-Fixed-Length-Queue-In-JavaScript-Using-Arrays.htm)

Installation

npm install fixedqueue

Use from the command line:

> var fixedQueue = require('fixedqueue').FixedQueue
> var queue = fixedQueue(2, ['first', 'second'])
> queue.enqueue('third')
> queue.enqueue('fourth', 'fifth')
> queue.enqueue('sixth', 'seventh')
> queue
[ 'third',
  'fourth',
  'fifth',
  'sixth',
  'seventh',
  permittedAmount: 5,
  trimTail: [Function],
  trimHead: [Function],
  push: [Function],
  unshift: [Function],
  splice: [Function],
  enqueue: [Function],
  dequeue: [Function] ]

an so on...

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

Keywords

object

FAQs

Package last updated on 12 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts