1.1.1 • Published 5 years ago

@extra-iterable/hamming-distance v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Get hamming distance between iterables.

const hammingDistance = require('@extra-iterable/hamming-distance');
// hammingDistance(<iterable1>, <iterable2>)

hammingDistance([0, 1, 0], [1, 1, 1]);
// 2
hammingDistance('karolin', 'kathrin');
// 3
hammingDistance(new Set().add(['algo', 'rithm']), ['algo']);
// NaN (iterables are of different lengths)

extra-iterable