# safequeue

> An smart queue module with timeout support

Latest version **0.0.2** (published 2012-11-21) · 0 weekly downloads

## Install

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

## 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.2 |
| Published | 2012-11-21 |
| First published | 2012-11-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.6.9 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aleafs Zhang |
| Maintainers | aleafs |
| Keywords | queue, timeout, maxitem |

## Links

- npm: https://www.npmjs.com/package/safequeue
- Homepage: git@github.com:aleafs/safequeue.git
- npm.io page: https://npm.io/package/safequeue

## 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

- 0.0.2 (latest) — 2012-11-21
- 0.0.1 — 2012-11-20

## README

[![Build Status](https://secure.travis-ci.org/aleafs/safequeue.png?branch=master)](http://travis-ci.org/aleafs/safequeue)

Jscoverage: [**100%**](http://aleafs.github.com/coverage/safequeue.html)

## About

`safequeue` is simple sequence queue for Node.js, which supports both `timeout` and `maxitem` control.

## Install

```bash
$ npm install safequeue
```

## Usage

```javascript
var queue = require('safequeue').create({
  'timeout' : 100,
  'maxitem' : 1000,
});

queue.on('fill', function () {
});

queue.on('full', function (len, max) {
});

queue.on('timeout', function (item, timeout, pos) {
  // XXX: console.log ...
});

queue.push({'a' : 1});
queue.pop();

```

## License

(The MIT License)

Copyright (c) 2012 aleafs (zhangxc83 at gmail.com) and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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