neofuzzy

1.0.2 • Public • Published

neofuzzy

Quick fuzzy search string in text with arbitrary edit distance threshold.

Install

npm install neofuzzy

Example

var { rangeOfWithDist, indexOfWithDist } = require("neofuzzy");

indexOfWithDist("a quick brown fox jumps over the lazy dog", "brwn", 1); // 8
indexOfWithDist("a quick brown fox jumps over the lazy dog", "lazydo", 1); // 33
indexOfWithDist("a quick brown fox jumps over the lazy dog", "not found", 2); // -1

rangeOfWithDist("a quick brown fox jumps over the lazy dog", "jump oer", 2) // [18, 28]
rangeOfWithDist("a quick brown fox jumps over the lazy dog", "not found", 2) // null 

Author

Jeanno jeanno.cheung@gmail.com

Package Sidebar

Install

npm i neofuzzy

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

41.8 kB

Total Files

6

Last publish

Collaborators

  • jeanno