IOTConnect-Web/node_modules/leven
2024-05-09 09:49:52 +08:00
..
index.js Initial commit 2024-05-09 09:49:52 +08:00
license Initial commit 2024-05-09 09:49:52 +08:00
package.json Initial commit 2024-05-09 09:49:52 +08:00
readme.md Initial commit 2024-05-09 09:49:52 +08:00

leven Build Status

Measure the difference between two strings
The fastest JS implementation of the Levenshtein distance algorithm

Install

$ npm install --save leven

Usage

const leven = require('leven');

leven('cat', 'cow');
//=> 2

Benchmark

$ npm run bench
         401,487 op/s » leven
         371,707 op/s » talisman
         264,191 op/s » levenshtein-edit-distance
         152,923 op/s » fast-levenshtein
          57,267 op/s » levenshtein-component
          19,915 op/s » levdist
          21,802 op/s » ld
          18,079 op/s » natural
          11,761 op/s » levenshtein

License

MIT © Sindre Sorhus