function checkWhitelist(action, whitelist) { return whitelist.find(mask => { if (_.isString(mask)) { return match(action, mask); } else if (_.isRegExp(mask)) { return mask.test(action); } }) != null; }
checkWhitelist(action, whitelist) { return whitelist.find(mask => { if (_.isString(mask)) { return nanomatch.isMatch(action, mask, { unixify: false }); } else if (_.isRegExp(mask)) { return mask.test(action); } }) != null }
function checkWhitelist(action, whitelist){ return whitelist.find(mask => { if (_.isString(mask)) { return match(action, mask) } else if (_.isRegExp(mask)) { return mask.test(action) } }) != null }
checkWhitelist(action, whitelist) { return whitelist.find(mask => { if (_.isString(mask)) { return nanomatch.isMatch(action, mask, { unixify: false }); } else if (_.isRegExp(mask)) { return mask.test(action); } }) != null; }