@extra-string/euclidean-distance

    1.1.3 • Public • Published

    Get Euclidean distance between strings, with normalized single UTF-16 code.

    const euclideanDistance = require('string-euclideandistance');
    // euclideanDistance(<string-1>, <string-2>)
     
    euclideanDistance('a', 'b');
    // 0.000015259021896696422 (normalized distance between 1 character code)
    euclideanDistance('logo', 'pogo');
    // 0.00006103608758678569
    euclideanDistance('doctor', 'broker');
    // 0.00028053370429312937

    extra-string

    Install

    npm i @extra-string/euclidean-distance

    DownloadsWeekly Downloads

    1

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    2.8 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar