hamming-distance

Calculate the hamming distance of two hex strings or buffers

Usage no npm install needed!

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

README

hamming-distance

NPM version Build status Test coverage Dependency Status License Downloads Gittip

Usage

var compare = require('hamming-distance');

var distance = compare(new Buffer('0000', 'hex'), new Buffer('000F', 'hex'));