New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

codi-test-framework

Package Overview
Dependencies
Maintainers
0
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codi-test-framework - npm Package Compare versions

Comparing version 0.0.29 to 0.0.30

2

package.json
{
"name": "codi-test-framework",
"version": "0.0.29",
"version": "0.0.30",
"description": "A simple test framework for JavaScript",

@@ -5,0 +5,0 @@ "main": "src/testRunner.js",

export function excludePattern(patterns) {
return (path) => {
return patterns.some(pattern => {
// Normalize path separators
const normalizedPattern = pattern.replace(/[\\/]+/g, '/');
const normalizedPath = path.replace(/[\\/]+/g, '/');
// Escape special regex characters in the pattern
const regexPattern = pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
// Create a regex that matches the pattern at the start, optionally followed by '/'
const regex = new RegExp(`^${regexPattern}($|/)`);
return regex.test(path);
const regexPattern = normalizedPattern
.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
.replace(/\//g, '[\\\\/]'); // Allow both / and \ as separators
// Create a regex that matches the pattern at the start, optionally followed by a separator
const regex = new RegExp(`^${regexPattern}($|[\\\\/])`);
return regex.test(normalizedPath);
});
};
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc