# fixed-size-queue

> Lightweight queue based on fixed size array internally.

Latest version **1.0.1** (published 2016-09-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install fixed-size-queue
pnpm add fixed-size-queue
yarn add fixed-size-queue
bun add fixed-size-queue
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-09-10 |
| First published | 2016-09-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sergey Egorov |
| Maintainers | egorov |
| Keywords | queue, javascript, fixed, size, array, based |

## Links

- npm: https://www.npmjs.com/package/fixed-size-queue
- Repository: https://github.com/egorov/fixed-size-queue
- Homepage: https://github.com/egorov/fixed-size-queue#readme
- Issues: https://github.com/egorov/fixed-size-queue/issues
- npm.io page: https://npm.io/package/fixed-size-queue

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-09-10
- 1.0.0 — 2016-09-10

## README

# fixed-size-queue

Lightweight queue based on fixed size array internally.

You can add it to your project with npm:

    npm install fixed-size-queue

Based on fixed size array. Internally write and read operations changes different locations in memory. Make an instance and use it like this: 

    var capacity = 1000,
    queue = require('fixed-size-queue').create(capacity);
    
    // New queue is empty and count equals 0
    assert.equal(0, queue.getCount());    
    
    var person = { id: 1, name: 'Jack' };
    
    queue.enqueue(person);
    
    // Now queue contains one item
    assert.equal(1, queue.getCount());
            
    var item = queue.dequeue();
    
    // Now it is empty again
    assert.equal(0, queue.getCount());    
        
Full usage instructions you can find at spec/QueueSpec.js.

---
_Source: https://npm.io/package/fixed-size-queue · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
