Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

keyv

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keyv - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

2

package.json
{
"name": "keyv",
"version": "0.6.0",
"version": "0.7.0",
"description": "Simple key/value store with support for multiple backends",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -13,3 +13,4 @@ 'use strict';

postgresql: 'keyv-postgres',
postgres: 'keyv-postgres'
postgres: 'keyv-postgres',
mysql: 'keyv-mysql'
};

@@ -16,0 +17,0 @@ if (opts.adapter || opts.uri) {

@@ -33,3 +33,3 @@ import test from 'ava';

t.is(await keyv.get('foo'), 'bar');
await delay(100);
await delay(150);
t.is(await keyv.get('foo'), 'bar');

@@ -43,3 +43,3 @@ });

t.is(await keyv.get('foo'), 'bar');
await delay(110);
await delay(150);
t.is(await keyv.get('foo'), undefined);

@@ -50,17 +50,17 @@ });

const store = new Map();
const keyv = new Keyv({ store, ttl: 100 });
const keyv = new Keyv({ store, ttl: 200 });
await keyv.set('foo', 'bar');
await keyv.set('fizz', 'buzz', 50);
await keyv.set('ping', 'pong', 150);
await keyv.set('fizz', 'buzz', 100);
await keyv.set('ping', 'pong', 300);
t.is(await keyv.get('foo'), 'bar');
t.is(await keyv.get('fizz'), 'buzz');
t.is(await keyv.get('ping'), 'pong');
await delay(60);
await delay(150);
t.is(await keyv.get('foo'), 'bar');
t.is(await keyv.get('fizz'), undefined);
t.is(await keyv.get('ping'), 'pong');
await delay(50);
await delay(100);
t.is(await keyv.get('foo'), undefined);
t.is(await keyv.get('ping'), 'pong');
await delay(50);
await delay(100);
t.is(await keyv.get('ping'), undefined);

@@ -67,0 +67,0 @@ });

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc