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.6 to 0.0.7

16

lib/client.js

@@ -206,2 +206,18 @@ /**

/**
* deleteMulti() - Delete multiple items from the cache
*
* @param {Array} keys - The keys of the items to delete
* @param {Function} [cb] - Callback to call when we have a value
* @returns {Promise}
*/
Client.prototype.deleteMulti = function(keys, cb) {
var self = this;
assert.ok(keys, 'Cannot delete without keys!');
return Promise.all(R.map(function(key) {
return self.run('delete', [key], cb);
}, keys));
};
/**
* set() - Set a value for the provided key

@@ -208,0 +224,0 @@ *

2

package.json
{
"name": "memcache-plus",
"version": "0.0.6",
"version": "0.0.7",
"description": "Better memcache for node",

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

@@ -256,2 +256,36 @@ require('chai').should();

describe('deleteMulti', function() {
var cache;
before(function() {
cache = new Client();
});
it('exists', function() {
cache.should.have.property('deleteMulti');
cache.deleteMulti.should.be.a('function');
});
it('works', function() {
var key1 = chance.word(),
key2 = chance.word();
return Promise.all([cache.set(key1, 'myvalue'), cache.set(key2, 'myvalue')])
.then(function() {
return cache.deleteMulti([key1, key2]);
})
.then(function() {
return cache.get(key1);
})
.catch(function(err) {
err.type.should.equal('NotFoundError');
})
.then(function() {
return cache.get(key2);
})
.catch(function(err) {
err.type.should.equal('NotFoundError');
});
});
});
describe('Helpers', function() {

@@ -258,0 +292,0 @@ describe('splitHost()', function() {

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