Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hamming-distance

math-utils61.3kMIT1.0.0

Calculate the hamming distance of two hex strings or buffers

hamming, distance

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'));