Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
push (key /*, values */) {
let args = [this.data, key]
args.push.apply(args, Array.prototype.slice.call(arguments, 1))
objectpath.push.apply(objectpath, args)
this.handler.changed([key])
}
// ensure a path exists (if it doesn't, set the default value you provide)
walker.on('file', (root, stat, next) => {
if (stat.name.indexOf('.') === 0) return next()
const basePath = root.split('/').slice(1).join('.')
const filePath = path.relative(
directory,
path.join(root, stat.name)
)
objectPath.push(tree, basePath, filePath)
paths[filePath] = {
file: true
}
next()
})
(value, args, context, info) => (
push(context, '_dependees', { path: info.path, value }), value
)
)
Rules.prototype.runOutcomes = function (outcomes, data) {
var outcomeKey;
var keys = Object.keys(outcomes);
//if any test is false, return
for (var i = 0; i < keys.length; i++) {
//handle arrays
if (keys[i].slice(-2) === "[]") {
outcomeKey = keys[i].slice(0, keys[i].length - 2);
path.push(data, outcomeKey, outcomes[keys[i]]);
} else {
path.set(data, keys[i], outcomes[keys[i]]);
}
}
return data;
};