2.1.0 • Published 1 year ago

word-match-helper v2.1.0

Weekly downloads
57
License
MIT
Repository
github
Last release
1 year ago

word-match-helper

Aho–Corasick based word checking. Match words fast.

Installation

npm install word-match-helper

development & test

npm run build
npm run dev
npm run test # basic cases 

Basic Usage

import { WordMatcher } from 'word-match-helper';

const wordChecker = new WordMatcher({
  targets: ['her', 'he', 'hers'],
});

// excepted matched result: ['her', 'he', 'hers']
wordChecker.search('ushers');

// add additional word list 
wordChecker.addWord(['she'])

// excepted matched result: ['her', 'he', 'hers', she]
wordChecker.search('ushers');
2.1.0

1 year ago

2.0.0

1 year ago

1.3.0

2 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago