regexbuddy
Advanced tools
Comparing version 0.0.15 to 0.0.17
@@ -1,13 +0,10 @@ | ||
export const filterValues = async (...input) => { | ||
// ...input accepts the input from the user at index 0, and the desired expression at index 1 | ||
export const filterValues = (...input) => { | ||
// Next line is a default expression to test the function and condition for missing expression in the arguments passed in | ||
if (input.length < 2) input.push(/[a-cA-c]+/); | ||
console.log("input:", input); | ||
const myRe = new RegExp(input[1]); | ||
if (typeof input[0] !== 'string') input = input[0]; | ||
const regexBuddyResult = await input.filter(item => { | ||
if (myRe.test(item)) { | ||
console.log("item:", item); | ||
return item; | ||
}; | ||
return input.filter(item => { | ||
if (myRe.test(item)) return item; | ||
}); | ||
return regexBuddyResult; | ||
} |
{ | ||
"name": "regexbuddy", | ||
"version": "0.0.15", | ||
"version": "0.0.17", | ||
"description": "Implement regex expressions in JavaScript", | ||
@@ -5,0 +5,0 @@ "repository": { |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
1120
9
1