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

cached

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cached - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

.travis.yml

4

CHANGELOG.md

@@ -0,3 +1,7 @@

v2.0.1
------
* Fix bug where backend errors were forwarded in getOrElse - @Kofia5 #3
v2.0.0
------
* Initial public release

7

lib/cache.js

@@ -140,3 +140,3 @@ /*

Cache.prototype.getOrElse = function (rawKey, val, opts, cb) {
var cache$, key, refreshValue, verifyFreshness;
var cache$, handleError, key, refreshValue, verifyFreshness;
key = this.applyPrefix(rawKey);

@@ -173,3 +173,6 @@ cache$ = optionalOpts(opts, cb);

}(this);
return this.getWrapped(key).then(verifyFreshness).nodeify(cb);
handleError = function (error) {
return null;
};
return this.getWrapped(key)['catch'](handleError).then(verifyFreshness).nodeify(cb);
};

@@ -176,0 +179,0 @@ return Cache;

{
"name": "cached",
"version": "2.0.0",
"version": "2.0.1",
"description": "Simple access to a cache",

@@ -35,2 +35,3 @@ "main": "lib/cached.js",

"devDependencies": {
"bondjs": "~1.0.0",
"coffee-script-redux": "2.0.0-beta7",

@@ -37,0 +38,0 @@ "expect.js": "0.2.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