lihai 8d6c751f49 feat: push | 2 年之前 | |
---|---|---|
.. | ||
index.js | 2 年之前 | |
license | 2 年之前 | |
package.json | 2 年之前 | |
readme.md | 2 年之前 |
Measure the difference between two strings
The fastest JS implementation of the Levenshtein distance algorithm
$ npm install --save leven
const leven = require('leven');
leven('cat', 'cow');
//=> 2
$ 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
MIT © Sindre Sorhus