JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q19175F
  • License MIT

Get Hamming distance between arrays.

Package Exports

  • @extra-array/hamming-distance

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@extra-array/hamming-distance) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Get Hamming distance between arrays.

const hammingDistance = require('@extra-array/hamming-distance');
// hammingDistance(<array1>, <array2>, [begin0=0], [end0], [begin1=0], [end1])

hammingDistance([0, 1, 0], [1, 1, 1]);
// 2
hammingDistance([2, 1, 7, 3, 8, 9, 6], [2, 2, 3, 3, 7, 9, 6]);
// 3
hammingDistance(['richard', 'hamming'], ['richard']);
// NaN (array lengths are not equal)

With extra-array try Array.hammigDistance() instead.

extra-array