{"_id":"js-levenshtein-esm","_rev":"4-bfbdf3ef4a13585e378cb3fd1c5f0654","name":"js-levenshtein-esm","dist-tags":{"latest":"2.0.0"},"versions":{"1.1.6":{"name":"js-levenshtein-esm","version":"1.1.6","keywords":["levenshtein","distance","algorithm","algo","string","difference","diff","fast","fuzzy","similar","similarity","compare","comparison","edit","text","match","matching"],"author":{"url":"https://github.com/43081j","name":"James Garbutt"},"license":"MIT","_id":"js-levenshtein-esm@1.1.6","maintainers":[{"name":"43081j","email":"43081james@gmail.com"}],"homepage":"https://github.com/43081j/js-levenshtein#readme","bugs":{"url":"https://github.com/43081j/js-levenshtein/issues"},"ava":{"require":["esm"]},"dist":{"shasum":"e5fd79ff1c092fbccfb49a0a0ebf48c4359a3272","tarball":"https://registry.npmjs.org/js-levenshtein-esm/-/js-levenshtein-esm-1.1.6.tgz","fileCount":5,"integrity":"sha512-XklFe51WrL0DWr5qiB4BhjsWQxRknBcltM8BeKSfJRNaWvmhS70lKbz4yhDcBKQUXHEt65+5ADx+tP3YUWuzOg==","signatures":[{"sig":"MEUCIQD2SNpE9MFR7U58EPEMuHDj0+kidwc3ejT8xLSOgLRjZwIgZcpkdYdLkHU3Puue1JBGYtxae2xaWxdeeXZxTLSTBh0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbJQWCRA9TVsSAnZWagAAPKoP/i1NtT7vB4p9uiKBeFNh\ntvug1g2gtn7+Ta/D6ZyKBl/kjErZKmMbfXNsTdH4dLaFs+5NGf59I9mqPX7s\nLWbud6zPSKNlcrVJ5eaFkdSmYYJEnL2lZQccqE+tnjECRfAmlJb+MNyXF5bY\nZyEI8MjjxdUbGzJXHbu13Ha/8Ah2R3iPZvHIt/lTDAmshoK8yUY8AuABQhgT\n5ztTpyqoSVxzFmm35/YSj8DkcmCzBKmhENLcXztYr8z4ujvfgv5nzpP/YpM3\n9uAEIyoF1mqpaHDoe0euNVViDn5y5AaI9ezO1gx9rx4E7ED662/8sVgM+/oY\nWVUNnEr3zZq2FTGjj6LM+gdkpOPjlBGOGcb8lrPkdaENA89g8kRoetx6xR4v\nagb8nGl4HcLDvSnRC8EUeEmoBhZ0XAwUmwEE5oIfXy+WJYsf+5t17ZvwsPmd\nW7FM74wPWvsBpfeyNyOinWyA7U0TMXEQiSzUNtn5+nFFV2WExNTjOc6OyWZF\ny3CMlzgo9QX2H2ffroyejP90RgMhqIY31a22Xo2fpnXPD1A08NqJ9vaCydx8\n+vJ0xgoLJ3QDlJeLdE9/z+B2S4mxgKqH8BC0/AmepiXVp9M0/OCdKYUQ1Kgq\nfs9/FTEHEUpHoozky6fZ2TR0l20iLG2Lfl05sOd/JI2quy5TxsykR7DPJpFU\ngIhJ\r\n=u1ND\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"80256e1269c7b099e9ce733c0103af38d42b8c5c","scripts":{"lint":"eslint \"src/**/*.ts\"","test":"ava \"test/index.js\"","bench":"matcha test/bench.js","build":"tsc","format":"prettier --write \"src/**/*.ts\""},"_npmUser":{"name":"43081j","email":"43081james@gmail.com"},"repository":{"url":"git+https://github.com/43081j/js-levenshtein.git","type":"git"},"_npmVersion":"6.4.1","description":"The most efficient JS implementation calculating the Levenshtein distance, i.e. the difference between two strings.","directories":{},"_nodeVersion":"10.11.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^1.2.1","esm":"^3.2.5","leven":"^2.1.0","eslint":"^5.14.1","matcha":"^0.7.0","prettier":"^1.16.4","talisman":"^0.21.0","typescript":"^3.3.3","fast-levenshtein":"^2.0.6","eslint-config-google":"^0.12.0","@typescript-eslint/parser":"^1.4.0","levenshtein-edit-distance":"^2.0.3","@typescript-eslint/eslint-plugin":"^1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/js-levenshtein-esm_1.1.6_1550619669909_0.4720319416793892","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"js-levenshtein-esm","version":"1.2.0","keywords":["levenshtein","distance","algorithm","algo","string","difference","diff","fast","fuzzy","similar","similarity","compare","comparison","edit","text","match","matching"],"author":{"url":"https://github.com/43081j","name":"James Garbutt"},"license":"MIT","_id":"js-levenshtein-esm@1.2.0","maintainers":[{"name":"43081j","email":"43081james@gmail.com"}],"homepage":"https://github.com/43081j/js-levenshtein#readme","bugs":{"url":"https://github.com/43081j/js-levenshtein/issues"},"dist":{"shasum":"96532c34e0c90df198c9419963c64ca3cf43ae92","tarball":"https://registry.npmjs.org/js-levenshtein-esm/-/js-levenshtein-esm-1.2.0.tgz","fileCount":8,"integrity":"sha512-fzreKVq1eD7eGcQr7MtRpQH94f8gIfhdrc7yeih38xh684TNMK9v5aAu2wxfIRMk/GpAJRrzcirMAPIaSDaByQ==","signatures":[{"sig":"MEUCIE2sedZIwL2PWLx8NkPv5IkSupR8mkAoeoEKqatePlXUAiEAnVwjONqSn3cCpfz2ta0JEyKqjkMc/8d85uaR77D30CE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdGZECRA9TVsSAnZWagAAV1MP/3XR7qA5hAKzQN4tMBcz\nmd8PNgZOj7mkgl5V1jI3M5kBZKOExTAnBk0R10td6KoMW1M0/2vYRZGC0IBs\nJpQjlWYjKhPHsiEohVbb+rsSBKRC9PW2X7Wu9FDH2EgO1dQNUles+TMO+HF1\ncVY574A4COBswJj2xTc5QZemEZGa50puqxLg+ExIBMnYNL0pinC75oSHScHm\nw7ZSGQ9k4Xt9LWlwegaKuBVN+oLacEOoXvVGYOppqzM+9rvCAqrKuW2G1/2Z\n7xus/7XwLd9m+VmI8u9cKa/PkOhUc4Z3D8lJP3RVJCD9Yk4ja5TFYaNameVz\nCVcH9Kq+iD8VL/uiYt2uMrzZEC1vGcovfdyS2WhoZSKpVT6fa3CTDtMF226p\nqAw8PSzut6p1nrXvcLLc9I8jQ44J+AZlVIPYWlzpafBnHevZSIiqoa1oYqhx\nmL66G3qlQW090NT5+EztGFALlUjV8ppI5wM6Pptc7jijNJXXSPhXlsBhneWZ\nsnBaQCdtJKsKKeycMfLQ39ZEULKCjkwBo5tVjl1TfpkR+/L6X/Lk7y+FLwKf\nkSmZZEy1Kb+28LKld4GyP6jozPPJJ0pBdujAqaXeJU4OQJtXMPS1lzYrpuhT\nA6uah84siQScwyanSPtlScw83Aix9bEi3xyfYB2kOx2dDME6QiKYVJwNx9pZ\nNKFq\r\n=LwJx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","module":"esm/index.js","gitHead":"697f8bcd28a2e6fdc808b298fc3664eba7f51a5d","scripts":{"lint":"eslint \"src/**/*.ts\"","test":"ava \"test/index.js\"","build":"tsc","format":"prettier --write \"src/**/*.ts\"","prepare":"npm run build:all","build:all":"npm run build && npm run build:esm","build:esm":"tsc -p tsconfig.esm.json","test:perf":"matcha perf","prepublishOnly":"npm run lint && npm run test"},"_npmUser":{"name":"43081j","email":"43081james@gmail.com"},"repository":{"url":"git+https://github.com/43081j/js-levenshtein.git","type":"git"},"_npmVersion":"6.4.1","description":"The most efficient JS implementation calculating the Levenshtein distance, i.e. the difference between two strings.","directories":{},"_nodeVersion":"10.11.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^1.2.1","leven":"^2.1.0","eslint":"^5.14.1","matcha":"^0.7.0","prettier":"^1.16.4","talisman":"^0.21.0","typescript":"^3.3.3","js-levenshtein":"^1.1.6","fast-levenshtein":"^2.0.6","eslint-config-google":"^0.12.0","@typescript-eslint/parser":"^1.4.0","levenshtein-edit-distance":"^2.0.3","@typescript-eslint/eslint-plugin":"^1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/js-levenshtein-esm_1.2.0_1551132227603_0.3923826601450704","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"js-levenshtein-esm","version":"2.0.0","description":"The most efficient JS implementation calculating the Levenshtein distance, i.e. the difference between two strings.","license":"MIT","type":"module","repository":{"type":"git","url":"git+https://github.com/43081j/js-levenshtein.git"},"author":{"name":"James Garbutt","url":"https://github.com/43081j"},"scripts":{"build":"tsc","format":"prettier --write \"src/**/*.ts\"","lint":"eslint src","test":"c8 --reporter=lcov node --test","test:perf":"node perf/index.js","prepare":"npm run build","prepublishOnly":"npm run lint && npm run test"},"main":"lib/index.js","module":"lib/index.js","keywords":["levenshtein","distance","algorithm","algo","string","difference","diff","fast","fuzzy","similar","similarity","compare","comparison","edit","text","match","matching"],"devDependencies":{"@eslint/js":"^9.22.0","c8":"^10.1.3","eslint":"^9.22.0","fast-levenshtein":"^2.0.6","js-levenshtein":"^1.1.6","leven":"^2.1.0","levenshtein-edit-distance":"^2.0.3","prettier":"^3.5.3","talisman":"^0.21.0","tinybench":"^4.0.1","typescript":"^5.8.2","typescript-eslint":"^8.26.1"},"_id":"js-levenshtein-esm@2.0.0","gitHead":"0007fd09849084eb2644231a0dd0ed65cd855169","types":"./lib/index.d.ts","bugs":{"url":"https://github.com/43081j/js-levenshtein/issues"},"homepage":"https://github.com/43081j/js-levenshtein#readme","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-1n4LEPOL4wRXY8rOQcuA7Iuaphe5xCMayvufCzlLAi+hRsnBRDbSS6XPuV58CBVJxj5D9ApFLyjQ7KzFToyHBw==","shasum":"a878b18af18815177b77cc6af14ed415fa59de87","tarball":"https://registry.npmjs.org/js-levenshtein-esm/-/js-levenshtein-esm-2.0.0.tgz","fileCount":5,"unpackedSize":6974,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/js-levenshtein-esm@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIChPE7LcE92bAH3K9aGrdfwSdh8kUV6NFmpmRFGZpQLxAiBYeMYBht9bfWU0Weus+6ev7UhPMyxbR+dlbkfU9dE2Gw=="}]},"_npmUser":{"name":"43081j","email":"43081james@gmail.com"},"directories":{},"maintainers":[{"name":"43081j","email":"43081james@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/js-levenshtein-esm_2.0.0_1742307312897_0.21481176524735712"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-19T23:41:09.909Z","modified":"2025-03-18T14:15:13.417Z","1.1.6":"2019-02-19T23:41:10.119Z","1.2.0":"2019-02-25T22:03:47.736Z","2.0.0":"2025-03-18T14:15:13.073Z"},"bugs":{"url":"https://github.com/43081j/js-levenshtein/issues"},"author":{"name":"James Garbutt","url":"https://github.com/43081j"},"license":"MIT","homepage":"https://github.com/43081j/js-levenshtein#readme","keywords":["levenshtein","distance","algorithm","algo","string","difference","diff","fast","fuzzy","similar","similarity","compare","comparison","edit","text","match","matching"],"repository":{"type":"git","url":"git+https://github.com/43081j/js-levenshtein.git"},"description":"The most efficient JS implementation calculating the Levenshtein distance, i.e. the difference between two strings.","maintainers":[{"name":"43081j","email":"43081james@gmail.com"}],"readme":"[![Build Status](https://travis-ci.com/43081j/js-levenshtein.svg?branch=master)](https://travis-ci.com/43081j/js-levenshtein)\n[![npm version](https://img.shields.io/npm/v/js-levenshtein-esm.svg?style=flat)](https://npmjs.org/package/js-levenshtein-esm \"View this project on npm\")\n\n# js-levenshtein-esm\n\nThis is a fork of [js-levenshtein](https://github.com/gustf/js-levenshtein)\nrewritten for ES module consumption.\n\n---\n\nA very efficient JS implementation calculating the Levenshtein distance, i.e. the difference between two strings.\n\nBased on Wagner-Fischer dynamic programming algorithm, optimized for speed and memory\n - use a single distance vector instead of a matrix\n - loop unrolling on the outer loop\n - remove common prefixes/postfixes from the calculation\n - minimize the number of comparisons\n\n## Install\n\n```\n$ npm i -S js-levenshtein-esm\n```\n\n\n## Usage\n\nIn Node:\n\n```js\nconst levenshtein = require('js-levenshtein-esm');\n\nlevenshtein('kitten', 'sitting'); // 3\n```\n\nIn the browser:\n\n```js\nimport levenshtein from 'https://unpkg.com/js-levenshtein-esm/js-levenshtein.js';\n\nlevenshtein('kitten', 'sitting'); // 3\n```\n\n## Benchmark\n\n```\n$ npm run test:perf\n\n  50 paragraphs, length max=500 min=240 avr=372.5\n     62 op/s � fast-levenshtein\n    143 op/s � js-levenshtein\n    140 op/s � js-levenshtein-esm\n     89 op/s � leven\n     92 op/s � levenshtein-edit-distance\n    100 op/s � talisman\n\n  100 sentences, length max=170 min=6 avr=57.5\n    1,304 op/s � fast-levenshtein\n    2,829 op/s � js-levenshtein\n    2,750 op/s � js-levenshtein-esm\n    1,780 op/s � leven\n    1,788 op/s � levenshtein-edit-distance\n    2,097 op/s � talisman\n\n  2000 words, length max=20 min=3 avr=9.5\n    1,952 op/s � fast-levenshtein\n    3,104 op/s � js-levenshtein\n    2,908 op/s � js-levenshtein-esm\n    2,351 op/s � leven\n    2,381 op/s � levenshtein-edit-distance\n    2,729 op/s � talisman\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}