Socket
Socket
Sign inDemoInstall

lru-cache-for-clusters-as-promised

Package Overview
Dependencies
9
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.3 to 1.4.4

2

lru-cache-for-clusters-as-promised.js

@@ -288,2 +288,4 @@ /**

get: key => promiseTo('get', key),
setObject: (key, value, maxAge) => promiseTo('set', key, JSON.stringify(value), maxAge),
getObject: key => promiseTo('get', key).then(value => Promise.resolve(JSON.parse(value))),
peek: key => promiseTo('peek', key),

@@ -290,0 +292,0 @@ del: key => promiseTo('del', key),

6

package.json
{
"name": "lru-cache-for-clusters-as-promised",
"version": "1.4.3",
"version": "1.4.4",
"description": "LRU Cache that is safe for clusters",

@@ -40,5 +40,5 @@ "main": "./lru-cache-for-clusters-as-promised.js",

"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^3.0.1",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-mocha": "^4.7.0",
"eslint-plugin-react": "^6.6.0",
"eslint-plugin-react": "^6.7.1",
"express": "^4.14.0",

@@ -45,0 +45,0 @@ "should": "^11.1.1",

@@ -16,2 +16,3 @@ const config = require('./config');

tests: {
objects: 'get and set objects',
pruneJob: 'prune cache using cron job',

@@ -43,2 +44,13 @@ set: 'set(key, value)',

},
objects: (cb) => {
const myObj = { foo: 'bar' };
cache.setObject(1, myObj)
.then(() => cache.getObject(1))
.then((obj) => {
should(obj).not.equal(null);
should(obj.foo).equal('bar');
cb(null, true);
})
.catch(err => cb(err));
},
hi: (cb) => {

@@ -45,0 +57,0 @@ let responded = false;

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