Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

modern-ahocorasick

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modern-ahocorasick - npm Package Compare versions

Comparing version 1.0.2-alpha.1 to 1.1.0

1

dist/index.d.ts

@@ -12,4 +12,5 @@ declare class AhoCorasick {

search(str: string): [number, string[]][];
match(str: string): boolean;
}
export { AhoCorasick as default };

@@ -82,2 +82,19 @@ // src/index.ts

}
match(str) {
let state = 0;
for (let i = 0; i < str.length; i++) {
const l = str[i];
while (state > 0 && !(l in this.gotoFn[state])) {
state = this.failure[state];
}
if (!(l in this.gotoFn[state])) {
continue;
}
state = this.gotoFn[state][l];
if (this.output[state].length > 0) {
return true;
}
}
return false;
}
};

@@ -84,0 +101,0 @@ export {

3

package.json
{
"name": "modern-ahocorasick",
"version": "1.0.2-alpha.1",
"version": "1.1.0",
"description": "modern-ahocorasick",

@@ -67,2 +67,3 @@ "type": "module",

"@types/node": "^20.12.12",
"@types/semantic-release": "^20.0.6",
"@vitest/coverage-v8": "^1.6.0",

@@ -69,0 +70,0 @@ "cross-env": "^7.0.3",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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