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

percy

Package Overview
Dependencies
Maintainers
3
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

percy - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

2

package.json
{
"name": "percy",
"version": "3.0.2",
"version": "3.0.3",
"description": "A persistance layer that plays nice with Couchbase",

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

@@ -91,3 +91,13 @@ var kgo = require('kgo'),

percy.bucket.getMulti(keys, done);
percy.bucket.getMulti(keys, function(error, result){
if(error){
if(parseInt(error, 10)){
return done(new Error('No such key (' + error + ')'));
}
return done(error);
}
done(null, result);
});
})

@@ -176,3 +186,5 @@ (['results'], function(results){

for(var property in data){
model[property] = data[property];
if(property !== 'id'){
model[property] = data[property];
}
}

@@ -179,0 +191,0 @@ percy.replace(id, model, callback);

@@ -228,3 +228,3 @@ var test = require('tape'),

t.plan(2);
t.plan(3);

@@ -236,4 +236,7 @@ var percy = createTestPercy();

percy.update(model.id, {b:2}, function(error, model){
var originalId = model.id;
percy.update(model.id, {id: 123, b:2}, function(error, model){
// remove the id for comparison
t.equal(model.id, originalId, 'id was not changed');
delete model.id;

@@ -371,1 +374,33 @@

});
test('getMulti stupid errors', function(t){
t.plan(3);
var percy = new Percy('thing', {
getMulti: function(keys, callback){
callback(123);
}
}, createMockValidator());
percy.getMulti(['foo', 'bar'], function(error, results){
t.ok(error instanceof Error, 'correct error');
t.equal(error.message, 'No such key (123)', 'correct error message');
t.notOk(results, 'no results returned');
});
});
test('getMulti normal error handeling', function(t){
t.plan(2);
var testError = 'BANG!!!!',
percy = new Percy('thing', {
getMulti: function(keys, callback){
callback(testError);
}
}, createMockValidator());
percy.getMulti(['foo', 'bar'], function(error, results){
t.equal(error, testError, 'correct error message');
t.notOk(results, 'no results returned');
});
});
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