{"_id":"propose","_rev":"11-24e19bd02ef32ce7a1de422679204271","name":"propose","time":{"modified":"2022-06-24T20:25:52.660Z","created":"2013-11-01T23:55:18.681Z","0.0.0":"2013-11-01T23:55:24.477Z","0.0.1":"2015-06-22T15:22:16.639Z","0.0.2":"2015-06-23T13:19:50.487Z","0.0.3":"2015-06-23T14:54:52.860Z","0.0.4":"2015-06-24T01:45:27.874Z","0.0.5":"2015-06-24T01:46:38.663Z"},"maintainers":[{"name":"liushuping","email":"lsp.lhh@gmail.com"}],"dist-tags":{"latest":"0.0.5"},"description":"Propse a word when the input word is not in the dictionary","readme":"# propose\r\nPropse a word when the input word is not in the dictionary\r\n\r\n[![build status](https://travis-ci.org/liushuping/propose.svg?branch=master)](https://travis-ci.org/liushuping/propose.svg?branch=master)\r\n\r\nThis module can be used to propse the right command in the scenario when there is a typo or mis-spell in the command line, it looks up the given dictionary and identifies the most similar word. It can also be used in any case that the string is formed by one or a series of known words, for example URL, directory path etc.\r\n\r\n## Example\r\n```javascript\r\nvar propose = require('propose');\r\nvar dictionary = ['hello', 'world'];\r\nvar word = 'hallo';\r\npropose(word, dictionary); //hello\r\n```\r\n\r\n## Options\r\n`threshold` [0~1] specifies only the word with similarity equals to or higher than that value will be returned\r\n```javascript\r\nvar propose = require('propose');\r\nvar dictionary = ['aaaaaaaa', 'baabbbb', 'ccccc'];\r\nvar word = 'ab';\r\npropose(word, dictionary, {\r\n    threshold: 0.5\r\n}); // null as the most similar word does not meet the threshold value\r\n```\r\n\r\n`ignoreCase` [true, false] specifies whether ignore case when comparing two words\r\n```javascript\r\nvar propose = require('propose');\r\nvar dictionary = ['HELLO', 'hallo'];\r\nvar word = 'hello';\r\npropose(word, dictionary, {\r\n    ignoreCase: true\r\n}); //'HELLO'\r\n```\r\n\r\n## Test\r\nMake sure `mocha` is installed globally\r\n```\r\nnpm install mocha -g\r\n```\r\nRun `npm test` to run unit test\r\n\r\n## Dependencies\r\nlevenshtein-edit-distance\r\n\r\n## License\r\nMIT","versions":{"0.0.1":{"name":"propose","version":"0.0.1","description":"Propse a word when the input word is not in the dictionary","main":"propose.js","scripts":{"test":"mocha test"},"repository":{"type":"git","url":"https://github.com/liushuping/propose"},"keywords":["word","typo","propose","similar","correction"],"author":{"name":"Shuping LIU"},"license":"MIT","gitHead":"08e884c86cf7e4d19d6c242f839309d2c8196aa1","bugs":{"url":"https://github.com/liushuping/propose/issues"},"_id":"propose@0.0.1","_shasum":"5ae1c14c4eaedc24abedb044feef76234c51a1a6","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"liushuping","email":"lsp.lhh@gmail.com"},"maintainers":[{"name":"liushuping","email":"lsp.lhh@gmail.com"}],"dist":{"shasum":"5ae1c14c4eaedc24abedb044feef76234c51a1a6","tarball":"https://registry.npmjs.org/propose/-/propose-0.0.1.tgz","integrity":"sha512-udyPqya2PvWV+Uoe47ZTucXuoTcY/XHleEp1iu6S/yyGyZKbkd0yuzaXJHdbFnzio4jGg2hSIGSOMEs15aMRBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGSvEj6P1hVIXRtmqNeG0rqOLs6O08JhadkBeoWwGb94AiBydqKNrbJLnqHuTPGx1hMsFI6pzIsnIDosxYpxx0ZPlg=="}]}},"0.0.2":{"name":"propose","version":"0.0.2","description":"Propse a word when the input word is not in the dictionary","main":"propose.js","scripts":{"test":"mocha test"},"repository":{"type":"git","url":"https://github.com/liushuping/propose"},"keywords":["word","typo","propose","similar","correction","did you mean"],"author":{"name":"Shuping LIU"},"license":"MIT","devDependencies":{"mocha":"^2.2.5"},"dependencies":{"levenshtein-edit-distance":"^0.1.4"},"gitHead":"c3ea45acb850e07e0408a671cbd1f0fc0984563e","bugs":{"url":"https://github.com/liushuping/propose/issues"},"_id":"propose@0.0.2","_shasum":"f5db2908dfb53bf2d3a3f8958871d9e452105ae1","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"liushuping","email":"lsp.lhh@gmail.com"},"maintainers":[{"name":"liushuping","email":"lsp.lhh@gmail.com"}],"dist":{"shasum":"f5db2908dfb53bf2d3a3f8958871d9e452105ae1","tarball":"https://registry.npmjs.org/propose/-/propose-0.0.2.tgz","integrity":"sha512-t0ooLM8txJA+7vyUY4+8kRfNdkJkOAftRJo2r/AXR5r+5PAcak/G+FmspoaHuOup9QHOUzKNBBqwh/4TXbhqiw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0VLXTupjYMGf7FLpxeVjsMsWN8X8GRZYDqs2iPS3LvAiAoTMCiRlqOYpMgAjqvhCZaxxdn9fx3Xk7vys3M+1dfYg=="}]}},"0.0.3":{"name":"propose","version":"0.0.3","description":"Propse a word when the input word is not in the dictionary","main":"propose.js","scripts":{"test":"mocha test"},"repository":{"type":"git","url":"https://github.com/liushuping/propose"},"keywords":["word","typo","propose","similar","correction","did you mean"],"author":{"name":"Shuping LIU"},"license":"MIT","devDependencies":{"mocha":"^2.2.5"},"dependencies":{"levenshtein-edit-distance":"^1.0.t0"},"gitHead":"07d1e61137ad7b221abec18f6f7a0877ceb9c5fa","bugs":{"url":"https://github.com/liushuping/propose/issues"},"_id":"propose@0.0.3","_shasum":"bb83b517daef5857172fa9a2cc909d48395efd96","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"liushuping","email":"lsp.lhh@gmail.com"},"maintainers":[{"name":"liushuping","email":"lsp.lhh@gmail.com"}],"dist":{"shasum":"bb83b517daef5857172fa9a2cc909d48395efd96","tarball":"https://registry.npmjs.org/propose/-/propose-0.0.3.tgz","integrity":"sha512-cNDiFL8LKRv7mLmQgsZ3hD2Lwqf4FEyWdXenPTN+7k8p9HrLs3BpenYaSz73fd63NR9Fa0yRUvMdCGPjnmO4uw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPXhQCTbHXTYYCcuH0pUCqwM42X0qGtSQMrMPJnX5uywIhAPn3u2VGq+97rxYDr2telyWmETsd1V6vwC/E0tzR+Ux6"}]}},"0.0.4":{"name":"propose","version":"0.0.4","description":"Propse a word when the input word is not in the dictionary","main":"propose.js","scripts":{"test":"mocha test"},"repository":{"type":"git","url":"git+https://github.com/liushuping/propose.git"},"keywords":["word","typo","propose","similar","correction","did you mean"],"author":{"name":"Shuping LIU"},"license":"MIT","devDependencies":{"mocha":"^2.2.5"},"dependencies":{"levenshtein-edit-distance":"^1.0.0"},"gitHead":"ac6acb91216d19b9ad7e1c14ab3d4bd5236ed092","bugs":{"url":"https://github.com/liushuping/propose/issues"},"homepage":"https://github.com/liushuping/propose#readme","_id":"propose@0.0.4","_shasum":"db5a892f2af8e50409b480f52c30ed1e1ebafe84","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"liushuping","email":"lsp.lhh@gmail.com"},"dist":{"shasum":"db5a892f2af8e50409b480f52c30ed1e1ebafe84","tarball":"https://registry.npmjs.org/propose/-/propose-0.0.4.tgz","integrity":"sha512-BSIWIsIdmzurgeY8S2zuN8S8N8imPKlWi2Kj3LDx4GJDvu/CdSrJc7v8647S0CZGvJBgxlSn6H3XhQPirUTyxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCElM40t44ymVGgKBXQpFK6d9zfdYBWl1UbgQeJ41NRWAIgPfC2erKAjpdWPcShnQyPSxePTSBHTbT3N6Vy1eEBj60="}]},"maintainers":[{"name":"liushuping","email":"lsp.lhh@gmail.com"}]},"0.0.5":{"name":"propose","version":"0.0.5","description":"Propse a word when the input word is not in the dictionary","main":"propose.js","scripts":{"test":"mocha test"},"repository":{"type":"git","url":"git+https://github.com/liushuping/propose.git"},"keywords":["word","typo","propose","similar","correction","did you mean"],"author":{"name":"Shuping LIU"},"license":"MIT","devDependencies":{"mocha":"^2.2.5"},"dependencies":{"levenshtein-edit-distance":"^1.0.0"},"gitHead":"ac6acb91216d19b9ad7e1c14ab3d4bd5236ed092","bugs":{"url":"https://github.com/liushuping/propose/issues"},"homepage":"https://github.com/liushuping/propose#readme","_id":"propose@0.0.5","_shasum":"48a065d9ec7d4c8667f4050b15c4a2d85dbca56b","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"liushuping","email":"lsp.lhh@gmail.com"},"dist":{"shasum":"48a065d9ec7d4c8667f4050b15c4a2d85dbca56b","tarball":"https://registry.npmjs.org/propose/-/propose-0.0.5.tgz","integrity":"sha512-Jary1vb+ap2DIwOGfyiadcK4x1Iu3pzpkDBy8tljFPmQvnc9ES3m1PMZOMiWOG50cfoAyYNtGeBzrp+Rlh4G9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWw2j/Sddmk/oDcy6KC8Dd1za5BZxpBRQ7mjO9/VF8yQIhAN4lnvT5i/hQqVKCo8LtJC2HWCJUsYcQ3YA2N77UcRi9"}]},"maintainers":[{"name":"liushuping","email":"lsp.lhh@gmail.com"}]}},"keywords":["word","typo","propose","similar","correction","did you mean"],"repository":{"type":"git","url":"git+https://github.com/liushuping/propose.git"},"author":{"name":"Shuping LIU"},"bugs":{"url":"https://github.com/liushuping/propose/issues"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/liushuping/propose#readme"}