Socket
Socket
Sign inDemoInstall

async-redis

Package Overview
Dependencies
4
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    async-redis

A light wrapper over redis_node for first class promise support.


Version published
Maintainers
1
Install size
281 kB
Created

Readme

Source

Async Redis

This is a light weight wrapper over the node_redis library with first call promise support. Ideal for ES7 async functions.

Usage Example

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

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

const async fn() {
  return await client.set("string key", "string val");
};

fn()
  .then((results) => {
    // Handle Results
  })
  .catch((error) => {
    // Handle Errors
  });

Decorating Existing Connection

const asyncRedis = require("async-redis");
const asyncClient = asyncRedis.decorate(redisClient);

API Information

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

For information on redis commands and configuration visit node_redis docs.

Keywords

FAQs

Last updated on 30 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc