Comparing version 1.3.1 to 1.3.2
{ | ||
"name": "flowx", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
18
utils.js
@@ -5,3 +5,3 @@ 'use strict' | ||
externals.matchRule = (rule, test, separator) => { | ||
module.exports.matchRule = (rule, test, separator) => { | ||
const ruleArray = rule.split(separator || '.') | ||
@@ -22,12 +22,12 @@ const testArray = test.split(separator || '.') | ||
externals.matchRegExp = (rule, test) => { | ||
module.exports.matchRegExp = (rule, test) => { | ||
const ruleArray = rule.split('/') | ||
const exp = {} | ||
if (rule.ruleArray > 1) | ||
exp = new RegExp(ruleArray[0], ruleArray[1]) | ||
else | ||
exp = new RegExp(ruleArray[0]) | ||
let exp = {} | ||
console.log(JSON.stringify(ruleArray)) | ||
if (ruleArray.length > 2) { | ||
exp = new RegExp(ruleArray[1], ruleArray[2]) | ||
} else { | ||
exp = new RegExp(ruleArray[1]) | ||
} | ||
return exp.test(test) | ||
} | ||
module.exports = externals |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7676
134