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

confidence

Package Overview
Dependencies
Maintainers
4
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

confidence - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

2

lib/id.js

@@ -45,3 +45,3 @@ // Load modules

while (!bytes) { // This can theoretically loop forever if the machine random device generates garbage
var rand = Crypto.randomBytes(3);
rand = Crypto.randomBytes(3);
var value = (rand[0] << 16) | (rand[1] << 8) | rand[2];

@@ -48,0 +48,0 @@ if (value >= 10000000) {

@@ -298,5 +298,5 @@ // Load modules

found.default = true;
var err = internals.Store.validate(node.$default, path + '/$default');
if (err) {
return err;
var err2 = internals.Store.validate(node.$default, path + '/$default');
if (err2) {
return err2;
}

@@ -321,5 +321,5 @@ }

found.value = true;
var err = internals.Store.validate(node.$value, path + '/$value');
if (err) {
return err;
var err3 = internals.Store.validate(node.$value, path + '/$value');
if (err3) {
return err3;
}

@@ -334,5 +334,5 @@ }

var value = node[key];
var err = internals.Store.validate(value, path + '/' + key);
if (err) {
return err;
var err4 = internals.Store.validate(value, path + '/' + key);
if (err4) {
return err4;
}

@@ -339,0 +339,0 @@ }

{
"name": "confidence",
"description": "Configuration API",
"version": "1.4.0",
"version": "1.4.1",
"repository": "git://github.com/hapijs/confidence",
"main": "index",
"main": "lib/index.js",
"keywords": [

@@ -30,3 +30,4 @@ "hapi",

"scripts": {
"test": "make test-cov"
"test": "lab -r console -t 100 -a code -L",
"test-cov-html": "lab -r html -o coverage.html -a code -L"
},

@@ -33,0 +34,0 @@ "licenses": [

@@ -156,2 +156,3 @@ // Load modules

confidence.stdout.on('data', function (data) {
expect(data.toString()).to.not.exist();

@@ -161,2 +162,3 @@ });

confidence.stderr.on('data', function (data) {
expect(data.toString()).to.exist();

@@ -166,4 +168,5 @@ });

confidence.on('close', function () {
done();
});
});

@@ -43,3 +43,3 @@ // Load modules

describe('criteria()', function() {
describe('criteria()', function () {

@@ -46,0 +46,0 @@ it('converts id to criteria', function (done) {

@@ -73,10 +73,10 @@ // Load modules

production: [
{animal: 'chicken'},
{animal: 'dog'}
{ animal: 'chicken' },
{ animal: 'dog' }
],
staging: [
{animal: 'cow'}
{ animal: 'cow' }
],
$base: [
{animal: 'cat'}
{ animal: 'cat' }
]

@@ -87,11 +87,11 @@ },

production: [
{animal: 'chicken'},
{animal: 'dog'}
{ animal: 'chicken' },
{ animal: 'dog' }
],
$base: {animal: 'cat'}
$base: { animal: 'cat' }
},
key9: {
$filter: 'env',
production: {animal: 'chicken'},
$base: [{animal: 'cat'}]
production: { animal: 'chicken' },
$base: [{ animal: 'cat' }]
},

@@ -146,6 +146,6 @@ ab: {

get('/key6', { color: 'red', animal: 'cow' }, { env: 'staging' });
get('/key7', [{ animal: 'cat'},{ animal: 'chicken'},{ animal: 'dog'}], { env: 'production' });
get('/key7', [{ animal: 'cat'},{ animal: 'cow'}], { env: 'staging' });
get('/key8', [{ animal: 'chicken'},{ animal: 'dog'}], { env: 'production' });
get('/key9', { animal: 'chicken'}, { env: 'production' });
get('/key7', [{ animal: 'cat' },{ animal: 'chicken' },{ animal: 'dog' }], { env: 'production' });
get('/key7', [{ animal: 'cat' },{ animal: 'cow' }], { env: 'staging' });
get('/key8', [{ animal: 'chicken' },{ animal: 'dog' }], { env: 'production' });
get('/key9', { animal: 'chicken' }, { env: 'production' });
get('/', { key1: 'abc', key2: 2, key3: { sub1: 0 }, key4: [12, 13, 14], key5: {}, ab: 6 });

@@ -443,3 +443,3 @@ get('/', { key1: 'abc', key2: 2, key3: { sub1: 0, sub2: '' }, key4: [12, 13, 14], key5: {}, ab: 6 }, { xfactor: 'yes' });

var err = Confidence.Store.validate(new Date);
var err = Confidence.Store.validate(new Date());

@@ -454,5 +454,6 @@ expect(err.message).to.equal('Invalid node object type');

it('adds the filter to the list of applied filters if node or criteria is not defined ', function (done) {
var applied = [];
Confidence.Store._logApplied(applied, { filter: 'env', valueId: '$default'});
Confidence.Store._logApplied(applied, { filter: 'env', valueId: '$default' });
expect(applied.length).to.equal(1);

@@ -459,0 +460,0 @@ done();

Sorry, the diff of this file is not supported yet

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