@dnode/redis

[![dependencies | 1 | 25](https://img.shields.io/badge/dependencies-1%20|%2025-blue.svg)](DEPENDENCIES.md)

Stats

StarsIssuesVersionUpdatedCreatedSize
@dnode/redis
003.1.03 years ago4 years agoMinified + gzip package size for @dnode/redis in KB

Readme

dependencies | 1 | 25

Usage

const redis = require('@dnode/redis')(process.env.REDIS_URL);

(async () => {
  await redis.set('key', 'value', 1 * 60 * 60);
  const value = await redis.get('key');
})();

If the expire is an object supporting asSeconds() (e.g. @dnode/duration or moment.duration) it will be used.

const duration = require('@dnode/duration');
const redis = require('@dnode/redis')(process.env.REDIS_URL);

(async () => {
  await redis.set('key', 'value', duration('1h'));
  const value = await redis.get('key');
})();

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.