Socket
Socket
Sign inDemoInstall

@keyv/redis

Package Overview
Dependencies
5
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.6 to 1.3.7

4

package.json
{
"name": "@keyv/redis",
"version": "1.3.6",
"version": "1.3.7",
"description": "Redis storage adapter for Keyv",

@@ -44,3 +44,3 @@ "main": "src/index.js",

"devDependencies": {
"ava": "^0.20.0",
"ava": "^0.22.0",
"coveralls": "^2.13.1",

@@ -47,0 +47,0 @@ "delay": "^2.0.0",

@@ -36,4 +36,14 @@ # @keyv/redis [<img width="100" align="right" src="https://rawgit.com/lukechilds/keyv/master/media/logo.svg" alt="keyv">](https://github.com/lukechilds/keyv)

Or you can manually create a storage adapter instance and pass it to Keyv:
```js
const Keyv = require('keyv');
const KeyvRedis = require('@keyv/redis');
const redis = new KeyvRedis('redis://user:pass@localhost:6379');
const keyv = new Keyv({ store: redis });
```
## License
MIT © Luke Childs

@@ -8,8 +8,12 @@ 'use strict';

class KeyvRedis extends EventEmitter {
constructor(opts) {
constructor(uri, opts) {
super();
this.ttlSupport = true;
opts = opts || {};
if (opts.uri) {
opts = Object.assign({}, { url: opts.uri }, opts);
opts = Object.assign(
{},
(typeof uri === 'string') ? { uri } : uri,
opts
);
if (opts.uri && typeof opts.url === 'undefined') {
opts.url = opts.uri;
}

@@ -16,0 +20,0 @@

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