is-in-hamming-distance

Returns true if the hamming distance between two strings or arrays of equal length is smaller than the given limit

Usage no npm install needed!

<script type="module">
  import isInHammingDistance from 'https://cdn.skypack.dev/is-in-hamming-distance';
</script>

README

isInHammingDistance

Returns true if the hamming distance between two strings or arrays of equal length is smaller than the given limit.

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