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

memcache-plus

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memcache-plus - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

9

lib/client.js

@@ -270,10 +270,3 @@ /**

return Promise.all(R.map(function(key) {
return self.run('get', [key], cb).catch(function(err) {
if (err.type === 'NotFoundError') {
// In getMulti, rather than throwing an error if an item is not
// found, we set to null. Don't want the whole set to fail if
// one item doesn't exist
return null;
}
});
return self.run('get', [key], cb);
}, keys));

@@ -280,0 +273,0 @@ };

2

lib/connection.js

@@ -253,3 +253,3 @@ /**

} else {
throw new misc.NotFoundError('No data found for key ' + key);
return null;
}

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

@@ -24,11 +24,1 @@ /**

};
var NotFoundError = function(message) {
this.type = 'NotFoundError';
this.message = message;
this.stack = (new Error()).stack;
};
NotFoundError.prototype = Object.create(Error.prototype);
exports.NotFoundError = NotFoundError;
{
"name": "memcache-plus",
"version": "0.0.7",
"version": "0.0.8",
"description": "Better memcache for node",

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

@@ -157,8 +157,4 @@ require('chai').should();

return cache.get(chance.word())
.catch(function(err) {
// Since we catch this error here, it won't bubble up the stack
// which is what we want, else it'd report this test as a failure.
// Note, under other circumstances, this would be a Promise anti-pattern.
err.should.be.ok;
err.type.should.equal('NotFoundError');
.then(function(v) {
expect(v).to.be.null;
});

@@ -168,6 +164,5 @@ });

it('with Callback', function(done) {
cache.get(chance.word(), function(err) {
err.should.be.ok;
err.type.should.equal('NotFoundError');
done();
cache.get(chance.word(), function(err, response) {
expect(response).to.be.null;
done(err);
});

@@ -252,4 +247,4 @@ });

})
.catch(function(err) {
err.type.should.equal('NotFoundError');
.then(function(v) {
expect(v).to.be.null;
});

@@ -281,10 +276,8 @@ });

})
.catch(function(err) {
err.type.should.equal('NotFoundError');
})
.then(function() {
.then(function(v) {
expect(v).to.be.null;
return cache.get(key2);
})
.catch(function(err) {
err.type.should.equal('NotFoundError');
.then(function(v) {
expect(v).to.be.null;
});

@@ -291,0 +284,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