Naysayers Promote Misery

    string-commonprefix

    0.1.3 • Public • Published

    string-commonprefix

    NOTE: string-commonprefix was renamed to @extra-string/common-prefix. NPM

    Get common prefix of strings.

    const commonPrefix = require('string-commonprefix');
    // commonPrefix(<string-1>, <string-2>)
     
    commonPrefix('peacock', 'peahen');
    // 'pea'
    commonPrefix('inception', 'interstellar');
    // 'in'
    commonPrefix('mars', 'tars');
    // ''

    Install

    npm i string-commonprefix

    DownloadsWeekly Downloads

    1

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    1.41 kB

    Total Files

    3

    Last publish

    Collaborators

    • wolfram77