{"_id":"closest-match","_rev":"7-bc0b1231184812ba543fe1090dd0eefc","time":{"1.1.0":"2021-08-30T09:15:41.067Z","created":"2021-08-31T10:08:25.183Z","1.3.0":"2021-08-31T10:08:25.383Z","modified":"2022-04-12T06:47:00.209Z","1.3.3":"2021-09-01T09:48:49.132Z"},"name":"closest-match","dist-tags":{"latest":"1.3.3"},"versions":{"1.3.0":{"name":"closest-match","version":"1.3.0","description":"Uses Levenshtein Distance to find the closest string match or matches in an array","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["levenshtien","leven","closest-match"],"author":{"name":"Plebus Supremus"},"license":"ISC","gitHead":"877ebb5da8aee3d220ab33f29f903e1b1941b397","_id":"closest-match@1.3.0","_nodeVersion":"14.17.0","_npmVersion":"7.20.6","dist":{"integrity":"sha512-kKptrEm2DXotgNn/l57B+dtTTwQm1lGgxz2+GvfEu1ylz9m/xNQw40PVBPWAl3GoGGU4ed2esBWNFNrmLWLXxg==","shasum":"9aca9d8978e0c4cd0d1494fc39b1ba9034f6f83e","tarball":"https://registry.npmjs.org/closest-match/-/closest-match-1.3.0.tgz","fileCount":6,"unpackedSize":3554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLf+ZCRA9TVsSAnZWagAANLsQAJdqAcoPIk5O6pTgGld3\nqnkGPFpZtffEtD1FeZoofET9CLA6hdHtWQ7Oqk65QumzqsmTDcZr/9Hlm2jy\n61d0qYN1CATRGmTvXddJsG2YEgNj9RmFr57uUI0o1wVIoEBfS2j35I6VQXnh\nb9MskWu9B+4ywln4Rt5NUHtor2GdjkUS6kFwyU74b6q8UNjwNw2pNZQj1t7H\nZFPm/w43HYq/NpteJdGXSeY7n9tIkLv94BM7lHxzbRKnoT7j068Skm98GNqI\n4UvBIBxkQGVicoGCpFlhBEwBYWYrQu/DFULTMtlOYw/0n0cKdHzmPqP5wzBo\nTxALlnnqdbLUTZ1KNVqHEVA1CdUubRK0FZguCW6iVsnaAPkMPTUtAcRqJuMe\ni1j33n16uW/wLsqmY0Broe//l8zOlt5oE3MQkUYbfj6I/WDIxDMBENRwAskL\nmSCIopu4T5IVeHuQSG8ZWM3S14lNJLw/BhYuxkU4YavYPQmF4i1YwwbGifAh\nHU37PkDr3UDzIt/k/aODUvnRS+8y+XkUIAlCykRtlrRCWyE9QqPO+6v13P0c\nvINanqR54ZH93jEDVnq3GaCUK86Id0V0Ls/UFXEuKUWhUoezp60fgvnW/CW9\nCW6ADdsXyQJlBBIVk2EYanEQwHXs7ov4RlFGiLzI/5F/7RE3HAC4LZzyCulX\nNqMV\r\n=hJHv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHKauiYmDLjf/to5hdlQQjHuMU6+HMZ0DGoKLaCz7dcBAiEAnI/xCykp7XP1hiCTEO7V8F81+VcSHpbNRrXJaUvKEdE="}]},"_npmUser":{"name":"plebus_supremus","email":"hl13851@gmail.com"},"directories":{},"maintainers":[{"name":"plebus_supremus","email":"hl13851@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/closest-match_1.3.0_1630404505233_0.7715567561634535"},"_hasShrinkwrap":false},"1.3.3":{"name":"closest-match","version":"1.3.3","description":"Uses Levenshtein Distance to find the closest string match or matches in an array","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"jest --config jestconfig.json","build":"tsc","prepare":"npm run build","version":"git add -A src","postversion":"git push && git push --tags"},"keywords":["levenshtien","leven","closest-match"],"author":{"name":"Plebus Supremus"},"license":"ISC","devDependencies":{"@types/jest":"^27.0.1","jest":"^27.1.0","ts-jest":"^27.0.5","typescript":"^4.4.2"},"gitHead":"f1d16075afcbfbd9ed81394fa5879323e66ee367","_id":"closest-match@1.3.3","_nodeVersion":"14.17.0","_npmVersion":"7.20.6","dist":{"integrity":"sha512-RSdHrZwNOvt2uMQgqJDJdM/I+5MlJ1tQJEXYrbRjSMXWiCRo06g2hwObJ7+WKt2J9ySK9/pJ0Q2vbL+BPkofDA==","shasum":"1fa6e72af7eb2d2f3b9286926df50033a6f8e540","tarball":"https://registry.npmjs.org/closest-match/-/closest-match-1.3.3.tgz","fileCount":8,"unpackedSize":4227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhL0yBCRA9TVsSAnZWagAAaXoP/0ieVGnyRazCyHlvN4nU\ng6oAXvDUfhmBY9EgJ/ReVXTarBzvOsmwLIlz1FRuCfiStH9J4CG3STWzRKDX\n1AZOnqv4G7jIUPNaFw2k7KZYTu6N+1TBXwes+hftIc1tsUUT67M6jNYOM7ni\nv2mpb65Ib5xae/FAQPkXpsW7Rf7QzqWwejqgHzuKitaKZMQrwJ3DZTN3mKXb\nJ+X+ecCvPTGHKnPLDAtl4i7robdffx6VoVgo08SBakKPQfQ7KgeO2Bm2hoQA\nFuQXbPyeo1ii2oYy4kDmrZx11WuCstK4fVcaE5USJ+sGAefmOCTneceEV5hJ\n1McyIlfM6VEg+VUsu6K3Qzl2pwwmcw8A2/vDeEJfvRj5xh7k6BiORIplfA+7\njCzm6hpU6L3pFF+C+YMsA/KC8hxki7QnXGqJ6rum+j0ZfzCp0NCcwswG5Hid\n8l54bVT+BcXdhdHQ0QMZN9q/aCnoKMcmM5H0NDqYHDk7QjpGNLS2owuIfZBS\nF58tUwmTSWU4n6twg0MVqJB9Lx63FEb3mUiTUKU1Ymhn7BnNMJM8Gb4Gjl4p\nIAKyEsh3ok/jFKANreh9T5YOw0nPRHBkGdhP1xW/k6xs87C2/aiyohxWUlc9\nKe7+r5lZyNb0UcA6oaMAgOL711eF9lbv6j392xKfarp83cDhGMElWvcMG5/6\nbMnf\r\n=raUH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrbV/c/REW92fvQPtnc+j8/XYcaKmCsCsSbFbJoHK8UgIgQLMKZw79RKbPAQZzrJNQ43Ic9Xyh33S/u8PSif0EivY="}]},"_npmUser":{"name":"plebus_supremus","email":"hl13851@gmail.com"},"directories":{},"maintainers":[{"name":"plebus_supremus","email":"hl13851@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/closest-match_1.3.3_1630489729020_0.1429175954610986"},"_hasShrinkwrap":false}},"maintainers":[{"name":"plebus_supremus","email":"hl13851@gmail.com"}],"description":"Uses Levenshtein Distance to find the closest string match or matches in an array","keywords":["levenshtien","leven","closest-match"],"author":{"name":"Plebus Supremus"},"license":"ISC","readme":"# Closest Match\nAn NPM module that finds the closest string match or matches in an array using [Levenshtein Distance](https://en.wikipedia.org/wiki/Levenshtein_distance)\n\n# Installation\n\n```\nnpm i closest-match\n```\n\n# Usage\n\n```js\nconst closest_match = require(\"closest-match\");\n\nclosest_match.distance(text1, text2) // Difference between text1 and text2\n// (Number of changes need to get from text1 to text2)\n\nclosest_match.closestMatch(text, array) // Closest match of text in an array\n\nclosest_match.closestMatch(text, array, true) // An array of all elements in an array that are closest to the text\n```\n\n# Methods\n\n| Method | Explanation |\n|-|-|\n| distance(text1, text2) | Returns the Levenshtein difference between the strings. |\n| closestMatch(text, array, showOccurrences) | Returns the closest match of a specified string in an array. If showOccurrences is true, then it returns an array of all of  the closest matches to the string in an array. |\n\n# Examples\n\n```js\nconst { distance, closestMatch } = require(\"closest-match\");\n\nconsole.log(distance(\"hlelo\", \"hello\")); // 2\n\nconsole.log(closestMatch(\"dag\", [\"dog\", \"pumpkin\"])); //dog\n\nconsole.log(closestMatch(\"hello\", [\"jello\", \"yellow\", \"bello\"], true)); // [\"jello\", \"bello\"]\n```","readmeFilename":"README.md"}