# workerjs-redis

> Redis wrapper for WorkerJS

Latest version **2.0.7** (published 2018-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install workerjs-redis
pnpm add workerjs-redis
yarn add workerjs-redis
bun add workerjs-redis
```

## 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 | 2.0.7 |
| Published | 2018-12-11 |
| First published | 2017-05-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | nemanjan00 |

## Links

- npm: https://www.npmjs.com/package/workerjs-redis
- Repository: https://github.com/workerJS/workerjs-redis
- Homepage: https://github.com/workerJS/workerjs-redis#readme
- Issues: https://github.com/workerJS/workerjs-redis/issues
- npm.io page: https://npm.io/package/workerjs-redis

## Dependencies (4)

- [redis](https://npm.io/package/redis.md) ^2.7.1
- [redis-parser](https://npm.io/package/redis-parser.md) ^2.6.0
- [redis-commands](https://npm.io/package/redis-commands.md) ^1.3.1
- [double-ended-queue](https://npm.io/package/double-ended-queue.md) ^2.1.0-0

## Recent versions

- 2.0.7 (latest) — 2018-12-11
- 2.0.6 — 2017-10-10
- 2.0.5 — 2017-10-10
- 2.0.4 — 2017-07-04
- 2.0.3 — 2017-07-04
- 2.0.2 — 2017-07-04
- 2.0.0 — 2017-07-04
- 1.0.1 — 2017-05-19
- 1.0.0 — 2017-05-19

## README

# workerjs-redis

Abstraction layer for using queue and messaging as event listeners. 

## Messaging

### Receive

``` javascript
const messaging = require("workerjs-redis")().messaging;

messaging.on("test", function(data){
	console.log(data);
}).then(function(){
	console.log("Subscribed");
}).catch(function(){
	console.log("Error while subscribing");
});

```

### Send

``` javascript
const messaging = require("workerjs-redis")().messaging;

messaging.emit("test", 123).then(function(){
	console.log("Sent");
}).catch(function(){
	console.log("Error while sending");
});

```

## Queue

### Receive

``` javascript
var queue = require("workerjs-redis")().queue;

queue.on("tasks", function(data){
	console.log(data);
});
```

### Send

``` javascript
var queue = require("workerjs-redis")().queue;

queue.emit("tasks", "123").then(function(){
	console.log("Sent");
}).catch(function(){
	console.log("Error while sending");
});
```

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