Nonconformist Propaganda Machine

    iterable-hammingdistance

    0.1.8 • Public • Published

    iterable-hammingdistance

    NOTE: iterable-hammingdistance was renamed to @extra-iterable/hamming-distance. NPM

    Get hamming distance between iterables.

    const hammingDistance = require('iterable-hammingdistance');
    // 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)

    Install

    npm i iterable-hammingdistance

    DownloadsWeekly Downloads

    18

    Version

    0.1.8

    License

    MIT

    Unpacked Size

    1.72 kB

    Total Files

    3

    Last publish

    Collaborators

    • wolfram77