JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 32214
  • Score
    100M100P100Q139617F
  • License MIT

Light wrapper over redis_node with first class promise support.

Package Exports

  • async-redis

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (async-redis) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Async Redis

npm npm Build Status Coverage Status

A light weight wrapper over the node_redis library with first class promise support. Ideal for ES7 async functions.

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 () => {
  return await client.set("string key", "string val");
};

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.