# batchq

> Simple queue which calls a callback every time capacity is reached

Latest version **0.0.3** (published 2014-10-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install batchq
pnpm add batchq
yarn add batchq
bun add batchq
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2014-10-10 |
| First published | 2014-10-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | marcosnils, xetorthio |

## Links

- npm: https://www.npmjs.com/package/batchq
- Repository: https://github.com/franela/batchq
- Issues: https://github.com/franela/batchq/issues
- npm.io page: https://npm.io/package/batchq

## Recent versions

- 0.0.3 (latest) — 2014-10-10
- 0.0.2 — 2014-10-10
- 0.0.1 — 2014-10-10

## README

BatchQ
======

Simple queue implementation which calls a callback every time the capacity is reached

## Example

```javascript

var BatchQueue = require('batchq');

var batchq = new BatchQueue(5, function() {
    console.log(this.splice(0,this.length)) //Will print [0,1,2,3,4]
});

batchq.push(0,1,2,3,4);
console.log(batchq.length); //Will be 1 as callback was executed
batchq.push(5);
batch.flush();  //Forces the callback to run as capacity hasn't been reached
```

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