@rikthepixel/fuzzystring
v1.1.1
Published
Simple fuzzy search library written in TypeScript
Downloads
1
Readme
fuzzystring
Simple fuzzy search library written in TypeScript
Alows partial matching of requested string. Useful for searching large sets of data without requesting acureate and full user input.
Demo
Install
- Using npm:
npm add fuzzystring
- Using yarn:
yarn add fuzzystring
import { fuzzyString } from 'fuzzystring';
Api
fuzzyString('liolor', 'lorem ipsum dolor sit');
// Outputs: 0.87
Performance
console.time('measure');
for (let i = 0; i < 100000; i++) {
fuzzyString(`ive ${i} lles`, `i have ${i} apples`);
}
console.timeEnd('measure');
// measure: 271.169921875ms
~200k ops/s jsperf
Development
Test
npm run test
Build
npm run build