{"id":23789956,"url":"https://github.com/blackglory/aho-corasick","last_synced_at":"2025-09-08T16:31:58.987Z","repository":{"id":41339571,"uuid":"352713599","full_name":"BlackGlory/aho-corasick","owner":"BlackGlory","description":"🌿 A simple Node.js wrapper for Rust's native implementation.","archived":false,"fork":false,"pushed_at":"2024-03-03T17:34:10.000Z","size":2991,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-01T17:17:46.804Z","etag":null,"topics":["library","native","nodejs","npm-package","rust"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@blackglory/aho-corasick","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlackGlory.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-03-29T16:38:23.000Z","updated_at":"2024-12-17T06:05:59.000Z","dependencies_parsed_at":"2024-03-03T18:33:06.639Z","dependency_job_id":"6c3a2220-a6bd-42bd-864d-c5fdad62d73b","html_url":"https://github.com/BlackGlory/aho-corasick","commit_stats":{"total_commits":110,"total_committers":2,"mean_commits":55.0,"dds":"0.045454545454545414","last_synced_commit":"0bf336ebf88acfda1906536b4ca40e693b2f06fd"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Faho-corasick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Faho-corasick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Faho-corasick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Faho-corasick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackGlory","download_url":"https://codeload.github.com/BlackGlory/aho-corasick/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232327018,"owners_count":18505988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","native","nodejs","npm-package","rust"],"created_at":"2025-01-01T17:17:48.481Z","updated_at":"2025-01-03T11:04:09.582Z","avatar_url":"https://github.com/BlackGlory.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aho-corasick\nA simple Node.js wrapper for [Rust's daachorse].\n\nIt's faster than [the fastest pure JS implementation] I know of,\nand it eats less memory.\n\n[Rust's daachorse]: https://crates.io/crates/daachorse\n[the fastest pure JS implementation]: https://www.npmjs.com/package/fastscan\n\n## Install\n```sh\nnpm install --save @blackglory/aho-corasick\n# or\nyarn add @blackglory/aho-corasick\n```\n\n## API\n```ts\nclass AhoCorasick {\n  constructor(\n    patterns: string[]\n  , options: { caseSensitive: boolean }\n  )\n\n  isMatch(text: string): boolean\n  findAll(text: string): string[]\n}\n```\n\n## Benchmark\nThe patterns come from the title of the Chinese Wikipedia.\nThe samples come from the text of the Chinese Wikipedia.\n\n|                  | Compilation   | Matching      |\n|------------------|---------------|---------------|\n| fastscan         | 2351 op/s     | 16.8 op/s     |\n| **aho-corasick** | 2348 op/s     | **63.5 op/s** |\n\nThe results of the benchmark are relative values,\nwhich will change according to different patterns and samples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackglory%2Faho-corasick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackglory%2Faho-corasick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackglory%2Faho-corasick/lists"}