Socket
Socket
Sign inDemoInstall

lru-cache-for-clusters-as-promised

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lru-cache-for-clusters-as-promised - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

.codeclimate.yml

39

package.json
{
"name": "lru-cache-for-clusters-as-promised",
"version": "1.0.2",
"version": "1.0.3",
"description": "LRU Cache that is safe for clusters",
"main": "./index.js",
"main": "./lru-cache-for-clusters-as-promised.js",
"scripts": {
"test": "mocha ./test",
"test": "DEBUG=lru-cache-for-clusters-as-promised mocha ./test",
"coverage-report": "./node_modules/.bin/istanbul-coverage-report",
"coverage": "npm run coverage-report && open ./coverage/lcov-report/index.html",
"coverage-badge": "./node_modules/.bin/istanbul-cobertura-badger -e 95 -g 85 -b \"${PWD##*/}\"",
"lint": "./node_modules/.bin/eslint .",
"coverage": "npm run coverage-report && open ./coverage/lcov-report/index.html",
"coverage-report": "rm -rf ./coverage && NODE_ENV=test XUNIT_FILE=./coverage/xunit.xml ./node_modules/.bin/istanbul cover _mocha --print none --report none -- --reporter=spec-xunit-file && istanbul report cobertura && istanbul report lcov",
"coverage-badge": "./node_modules/istanbul-cobertura-badger/lib/cli.js -e 95 -g 85 -b \"${PWD##*/}\""
"validate": "./node_modules/.bin/module-validator",
"depcheck": "./node_modules/.bin/dependency-checker"
},

@@ -29,2 +31,3 @@ "repository": {

"dependencies": {
"debug": "^2.2.0",
"lru-cache": "^4.0.1",

@@ -34,17 +37,17 @@ "uuid": "^2.0.2"

"devDependencies": {
"body-parser": "^1.15.2",
"eslint": "^3.3.1",
"eslint-config-airbnb": "^10.0.1",
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.1.0",
"eslint-plugin-mocha": "^4.4.0",
"eslint-plugin-react": "^6.1.2",
"developer-tools": "0.0.2",
"eslint-config-airbnb": "^11.1.0",
"eslint-plugin-import": "^1.15.0",
"eslint-plugin-jsx-a11y": "^2.2.2",
"eslint-plugin-mocha": "^4.5.1",
"eslint-plugin-react": "^6.3.0",
"express": "^4.14.0",
"istanbul": "^0.4.5",
"istanbul-cobertura-badger": "^1.2.1",
"mocha": "^3.0.2",
"should": "^11.1.0",
"spec-xunit-file": "0.0.1-3",
"supertest": "^2.0.0"
}
},
"pre-commit": [
"lint",
"validate",
"depcheck"
]
}

@@ -7,3 +7,2 @@ # lru-cache-for-clusters-as-promised

[![Code Climate](https://codeclimate.com/github/doublesharp/lru-cache-for-clusters-as-promised/badges/gpa.svg)](https://codeclimate.com/github/doublesharp/lru-cache-for-clusters-as-promised)
[![Issue Count](https://codeclimate.com/github/doublesharp/lru-cache-for-clusters-as-promised/badges/issue_count.svg)](https://codeclimate.com/github/doublesharp/lru-cache-for-clusters-as-promised)
![Dependency Status](https://david-dm.org/doublesharp/lru-cache-for-clusters-as-promised.svg)

@@ -10,0 +9,0 @@ ![Dev Dependency Status](https://david-dm.org/doublesharp/lru-cache-for-clusters-as-promised/dev-status.svg)

@@ -15,9 +15,11 @@ const http = require('http');

// test non-caching messages
let callback;
process.on('message', (response) => callback && callback(response));
app.get('/hi', (req, res) => {
callback = (response) => {
res.send(response);
let responded = false;
const callback = (response) => {
if (!responded) {
responded = true;
res.send(response);
}
};
process.on('message', response => callback && callback(response));
process.send('hi');

@@ -28,3 +30,4 @@ });

cache.set(config.args.one, config.args.one)
.then((result) => res.send(result));
.then(result => res.send(result))
.catch(err => res.send(err));
});

@@ -35,3 +38,4 @@

.then(() => cache.get(config.args.one))
.then((result) => res.send(result));
.then(result => res.send(result))
.catch(err => res.send(err));
});

@@ -42,3 +46,4 @@

.then(() => cache.get(config.args.one))
.then((result) => res.send(result));
.then(result => res.send(result))
.catch(err => res.send(err));
});

@@ -52,3 +57,4 @@

.then(() => cache.get(config.args.one))
.then((result) => res.send(result));
.then(result => res.send(result))
.catch(err => res.send(err));
});

@@ -63,3 +69,4 @@

.then(() => cache.get(config.args.one))
.then((result) => res.send(result));
.then(result => res.send(result))
.catch(err => res.send(err));
});

@@ -81,3 +88,4 @@

return res.send(vals);
});
})
.catch(err => res.send(err));
});

@@ -88,3 +96,4 @@

.then(() => cache.has(config.args.one))
.then((result) => res.send(result));
.then(result => res.send(result))
.catch(err => res.send(err));
});

@@ -103,3 +112,4 @@

return res.send(vals);
});
})
.catch(err => res.send(err));
});

@@ -110,3 +120,4 @@

.then(() => cache.itemCount())
.then((result) => res.send({ result }));
.then(result => res.send({ result }))
.catch(err => res.send(err));
});

@@ -125,3 +136,4 @@

return res.send(vals);
});
})
.catch(err => res.send(err));
});

@@ -131,5 +143,8 @@

cache.set(config.args.one, config.args.one)
.then(() => cache.prune())
.then(() => cache.itemCount())
.then((result) => res.send({ result }));
.then(() => cache.prune()
.catch(err => res.send(err)))
.then(() => cache.itemCount()
.catch(err => res.send(err)))
.then(result => res.send({ result }))
.catch(err => res.send(err));
});

@@ -140,3 +155,4 @@

.then(() => cache.dump())
.then((result) => res.send({ result }));
.then(result => res.send({ result }))
.catch(err => res.send(err));
});

@@ -143,0 +159,0 @@

@@ -20,3 +20,3 @@ const should = require('should');

.then(() => done())
.catch((err) => done(err));
.catch(err => done(err));
});

@@ -31,3 +31,3 @@

})
.catch((err) => done(err));
.catch(err => done(err));
});

@@ -42,3 +42,3 @@

})
.catch((err) => done(err));
.catch(err => done(err));
});

@@ -56,3 +56,3 @@

})
.catch((err) => done(err));
.catch(err => done(err));
});

@@ -71,3 +71,3 @@

})
.catch((err) => done(err));
.catch(err => done(err));
});

@@ -91,3 +91,3 @@

})
.catch((err) => done(err));
.catch(err => done(err));
});

@@ -102,3 +102,3 @@

})
.catch((err) => done(err));
.catch(err => done(err));
});

@@ -119,3 +119,3 @@

})
.catch((err) => done(err));
.catch(err => done(err));
});

@@ -131,3 +131,3 @@

})
.catch((err) => done(err));
.catch(err => done(err));
});

@@ -142,4 +142,4 @@

})
.catch((err) => done(err));
.catch(err => done(err));
});
});
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