Socket
Socket
Sign inDemoInstall

regexbuddy

Package Overview
Dependencies
0
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.15 to 0.0.17

13

bin/index.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc