Skip to content

Commit

Permalink
upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sbertal committed Jul 5, 2019
1 parent eb64c56 commit 376ca2b
Show file tree
Hide file tree
Showing 6 changed files with 2,609 additions and 45 deletions.
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
env:
node: true
extend: "eslint:recommended"
extends: "eslint:recommended"
rules:
indent: [2, 4, {SwitchCase: 1}]
quotes: [2, 'single']
dot-notation: [2, {allowKeywords: false}]

no-prototype-builtins: 0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.nyc_output
artifacts
node_modules
*.log
76 changes: 38 additions & 38 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,50 +310,50 @@ Ycb.prototype = {
var usedValues = {};
var contexts = {};
configLoop:
for(var i=0; i<config.length; i++) {
if (config[i].settings) {
var setting = config[i].settings;
if(setting.length === 0 ) {
continue;
}
if(setting[0] === 'master') {
if(this.masterDelta !== undefined) {
this.masterDelta = mergeDeep(this._buildDelta(config[i]), this.masterDelta, true);
} else {
this.masterDelta = this._buildDelta(config[i]);
}
continue;
}
var context = new Array(height);
for(var q=0; q<height; q++) {
context[q] = DEFAULT;
for(var i=0; i<config.length; i++) {
if (config[i].settings) {
var setting = config[i].settings;
if(setting.length === 0 ) {
continue;
}
if(setting[0] === 'master') {
if(this.masterDelta !== undefined) {
this.masterDelta = mergeDeep(this._buildDelta(config[i]), this.masterDelta, true);
} else {
this.masterDelta = this._buildDelta(config[i]);
}
for(var j=0; j<setting.length; j++) {
var kv = setting[j].split(':');
var dim = kv[0];
var index = allDimensions[dim];
if(index === undefined) {
console.log('WARNING: invalid dimension "' + dim +
continue;
}
var context = new Array(height);
for(var q=0; q<height; q++) {
context[q] = DEFAULT;
}
for(var j=0; j<setting.length; j++) {
var kv = setting[j].split(':');
var dim = kv[0];
var index = allDimensions[dim];
if(index === undefined) {
console.log('WARNING: invalid dimension "' + dim +
'" in settings ' + JSON.stringify(setting));
continue configLoop;
}
usedDimensions[dim] = 1;
usedValues[dim] = usedValues[dim] || {};

if(kv[1].indexOf(',') === -1) {
usedValues[dim][kv[1]] = 1;
context[index] = kv[1];
} else {
var vals = kv[1].split(',');
context[index] = vals;
for(var k=0; k<vals.length; k++) {
usedValues[dim][vals[k]] = 1;
}
continue configLoop;
}
usedDimensions[dim] = 1;
usedValues[dim] = usedValues[dim] || {};

if(kv[1].indexOf(',') === -1) {
usedValues[dim][kv[1]] = 1;
context[index] = kv[1];
} else {
var vals = kv[1].split(',');
context[index] = vals;
for(var k=0; k<vals.length; k++) {
usedValues[dim][vals[k]] = 1;
}
}
contexts[i] = context;
}
contexts[i] = context;
}
}
return [usedDimensions, usedValues, contexts];
},

Expand Down
Loading

0 comments on commit 376ca2b

Please sign in to comment.