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

modern-ahocorasick

  • 1.1.0
  • next
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
567K
decreased by-13.14%
Maintainers
1
Weekly downloads
 
Created
Source

modern-ahocorasick

Forked from https://github.com/BrunoRB/ahocorasick and make it modern! Thanks to the author(BrunoRB) of ahocorasick

Implementation of the Aho-Corasick string searching algorithm, as described in the paper "Efficient string matching: an aid to bibliographic search".

this pkg has cjs and esm format, and have .d.ts file.

Install

<npm/yarn/pnpm> i modern-ahocorasick

Usage

// cjs
const AhoCorasick = require('modern-ahocorasick');
// esm
import AhoCorasick from 'modern-ahocorasick'

const ac = new AhoCorasick(['keyword1', 'keyword2', 'etc']);
const results = ac.search('should find keyword1 at position 19 and keyword2 at position 47.');

// [ [ 19, [ 'keyword1' ] ], [ 47, [ 'keyword2' ] ] ]

Visualization

See https://brunorb.github.io/ahocorasick/visualization.html for an interactive visualization of the algorithm.

License

The MIT License

FAQs

Package last updated on 25 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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