is-in-hamming-distance
v1.0.0
Published
Returns true if the hamming distance between two strings or arrays of equal length is smaller than the given limit
Downloads
4
Readme
isInHammingDistance
Returns true if the hamming distance between two strings or arrays of equal length is smaller than the given limit.
- Wikipedia: Hamming Distance
- API: API.md
- Benchmark: BENCHMARK.txt
Install
npm install is-in-hamming-distance --save
Usage
const isInHammingDistance = require("is-in-hamming-distance");
console.log(isInHammingDistance(3, "karolin", "kathrin"));
// => true
console.log(isInHammingDistance(1, "karolin", "kathrin"));
// => false
License
MIT