110 lines
6.4 KiB
JSON
110 lines
6.4 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "fast-levenshtein@~2.0.4",
|
|
"scope": null,
|
|
"escapedName": "fast-levenshtein",
|
|
"name": "fast-levenshtein",
|
|
"rawSpec": "~2.0.4",
|
|
"spec": ">=2.0.4 <2.1.0",
|
|
"type": "range"
|
|
},
|
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/optionator"
|
|
]
|
|
],
|
|
"_from": "fast-levenshtein@>=2.0.4 <2.1.0",
|
|
"_id": "fast-levenshtein@2.0.6",
|
|
"_inCache": true,
|
|
"_location": "/fast-levenshtein",
|
|
"_nodeVersion": "6.9.1",
|
|
"_npmOperationalInternal": {
|
|
"host": "packages-12-west.internal.npmjs.com",
|
|
"tmp": "tmp/fast-levenshtein-2.0.6.tgz_1482873305730_0.48711988772265613"
|
|
},
|
|
"_npmUser": {
|
|
"name": "hiddentao",
|
|
"email": "ram@hiddentao.com"
|
|
},
|
|
"_npmVersion": "3.10.8",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "fast-levenshtein@~2.0.4",
|
|
"scope": null,
|
|
"escapedName": "fast-levenshtein",
|
|
"name": "fast-levenshtein",
|
|
"rawSpec": "~2.0.4",
|
|
"spec": ">=2.0.4 <2.1.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/optionator"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
|
"_shasum": "3d8a5c66883a16a30ca8643e851f19baa7797917",
|
|
"_shrinkwrap": null,
|
|
"_spec": "fast-levenshtein@~2.0.4",
|
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/optionator",
|
|
"author": {
|
|
"name": "Ramesh Nair",
|
|
"email": "ram@hiddentao.com",
|
|
"url": "http://www.hiddentao.com/"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/hiddentao/fast-levenshtein/issues"
|
|
},
|
|
"dependencies": {},
|
|
"description": "Efficient implementation of Levenshtein algorithm with locale-specific collator support.",
|
|
"devDependencies": {
|
|
"chai": "~1.5.0",
|
|
"grunt": "~0.4.1",
|
|
"grunt-benchmark": "~0.2.0",
|
|
"grunt-cli": "^1.2.0",
|
|
"grunt-contrib-jshint": "~0.4.3",
|
|
"grunt-contrib-uglify": "~0.2.0",
|
|
"grunt-mocha-test": "~0.2.2",
|
|
"grunt-npm-install": "~0.1.0",
|
|
"load-grunt-tasks": "~0.6.0",
|
|
"lodash": "^4.0.1",
|
|
"mocha": "~1.9.0"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"shasum": "3d8a5c66883a16a30ca8643e851f19baa7797917",
|
|
"tarball": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz"
|
|
},
|
|
"files": [
|
|
"levenshtein.js"
|
|
],
|
|
"gitHead": "5bffe7151f99fb02f319f70a004e653105a760fb",
|
|
"homepage": "https://github.com/hiddentao/fast-levenshtein#readme",
|
|
"keywords": [
|
|
"levenshtein",
|
|
"distance",
|
|
"string"
|
|
],
|
|
"license": "MIT",
|
|
"main": "levenshtein.js",
|
|
"maintainers": [
|
|
{
|
|
"name": "hiddentao",
|
|
"email": "ram@hiddentao.com"
|
|
}
|
|
],
|
|
"name": "fast-levenshtein",
|
|
"optionalDependencies": {},
|
|
"readme": "# fast-levenshtein - Levenshtein algorithm in Javascript\n\n[![Build Status](https://secure.travis-ci.org/hiddentao/fast-levenshtein.png)](http://travis-ci.org/hiddentao/fast-levenshtein)\n[![NPM module](https://badge.fury.io/js/fast-levenshtein.png)](https://badge.fury.io/js/fast-levenshtein)\n[![NPM downloads](https://img.shields.io/npm/dm/fast-levenshtein.svg?maxAge=2592000)](https://www.npmjs.com/package/fast-levenshtein)\n[![Follow on Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/hiddentao)\n\nAn efficient Javascript implementation of the [Levenshtein algorithm](http://en.wikipedia.org/wiki/Levenshtein_distance) with locale-specific collator support.\n\n## Features\n\n* Works in node.js and in the browser.\n* Better performance than other implementations by not needing to store the whole matrix ([more info](http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm)).\n* Locale-sensitive string comparisions if needed.\n* Comprehensive test suite and performance benchmark.\n* Small: <1 KB minified and gzipped\n\n## Installation\n\n### node.js\n\nInstall using [npm](http://npmjs.org/):\n\n```bash\n$ npm install fast-levenshtein\n```\n\n### Browser\n\nUsing bower:\n\n```bash\n$ bower install fast-levenshtein\n```\n\nIf you are not using any module loader system then the API will then be accessible via the `window.Levenshtein` object.\n\n## Examples\n\n**Default usage**\n\n```javascript\nvar levenshtein = require('fast-levenshtein');\n\nvar distance = levenshtein.get('back', 'book'); // 2\nvar distance = levenshtein.get('我愛你', '我叫你'); // 1\n```\n\n**Locale-sensitive string comparisons**\n\nIt supports using [Intl.Collator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator) for locale-sensitive string comparisons:\n\n```javascript\nvar levenshtein = require('fast-levenshtein');\n\nlevenshtein.get('mikailovitch', 'Mikhaïlovitch', { useCollator: true});\n// 1\n```\n\n## Building and Testing\n\nTo build the code and run the tests:\n\n```bash\n$ npm install -g grunt-cli\n$ npm install\n$ npm run build\n```\n\n## Performance\n\n_Thanks to [Titus Wormer](https://github.com/wooorm) for [encouraging me](https://github.com/hiddentao/fast-levenshtein/issues/1) to do this._\n\nBenchmarked against other node.js levenshtein distance modules (on Macbook Air 2012, Core i7, 8GB RAM):\n\n```bash\nRunning suite Implementation comparison [benchmark/speed.js]...\n>> levenshtein-edit-distance x 234 ops/sec ±3.02% (73 runs sampled)\n>> levenshtein-component x 422 ops/sec ±4.38% (83 runs sampled)\n>> levenshtein-deltas x 283 ops/sec ±3.83% (78 runs sampled)\n>> natural x 255 ops/sec ±0.76% (88 runs sampled)\n>> levenshtein x 180 ops/sec ±3.55% (86 runs sampled)\n>> fast-levenshtein x 1,792 ops/sec ±2.72% (95 runs sampled)\nBenchmark done.\nFastest test is fast-levenshtein at 4.2x faster than levenshtein-component\n```\n\nYou can run this benchmark yourself by doing:\n\n```bash\n$ npm install\n$ npm run build\n$ npm run benchmark\n```\n\n## Contributing\n\nIf you wish to submit a pull request please update and/or create new tests for any changes you make and ensure the grunt build passes.\n\nSee [CONTRIBUTING.md](https://github.com/hiddentao/fast-levenshtein/blob/master/CONTRIBUTING.md) for details.\n\n## License\n\nMIT - see [LICENSE.md](https://github.com/hiddentao/fast-levenshtein/blob/master/LICENSE.md)\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/hiddentao/fast-levenshtein.git"
|
|
},
|
|
"scripts": {
|
|
"benchmark": "grunt benchmark",
|
|
"build": "grunt build",
|
|
"prepublish": "npm run build",
|
|
"test": "mocha"
|
|
},
|
|
"version": "2.0.6"
|
|
}
|