async-redis
Light wrapper over redis_node with first class async & promise support.
Last updated a year ago by moaxaca .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install async-redis 
SYNC missed versions from official npm registry.

Async Redis

Build Status npm npm license Coverage Status Maintainability Known Vulnerabilities

Light weight wrapper over the node_redis library with first class async & promise support.

Installation

To install the stable version:

npm install --save async-redis

Usage Example

Creating Connection

const asyncRedis = require("async-redis");
const client = asyncRedis.createClient();

client.on("error", function (err) {
    console.log("Error " + err);
});

const asyncBlock = async () => {
  await client.set("string key", "string val");
  const value = await client.get("string key");
  console.log(value);
  await client.flushall("string key");
};

Decorating Existing Connections

const redis = require("redis");
const client = redis.createClient();
const asyncRedis = require("async-redis");
const asyncRedisClient = asyncRedis.decorate(client);

API Information

This library does very little modification to the api of node_redis. It simply appends a promise resolving/rejecting callback for every command.

For information on redis commands and configuration visit node_redis docs.

License

MIT

Current Tags

  • 1.1.7                                ...           latest (a year ago)

8 Versions

  • 1.1.7                                ...           a year ago
  • 1.1.5                                ...           a year ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 105
This Month 168
Last Day 13
Last Week 107
Last Month 762
Dependencies (2)
Dev Dependencies (10)

Copyright 2014 - 2017 © taobao.org |