1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1× 1× 6× 1× 6× 6× 6× | var ExMatch = require('expression-match'); function isObject (arg) { return Object.prototype.toString.call(arg) === '[object Object]'; }; module.exports = function evalDependsOn (dependsOn, values) { Iif (!isObject(dependsOn) || !Object.keys(dependsOn).length) { return true; } var Match = new ExMatch(dependsOn, values, false); return Match.match(); }; |