Nonstop Pajama Models

    @extra-string/common-prefix

    1.1.3 • Public • Published

    Get common prefix of strings.

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

    extra-string

    Install

    npm i @extra-string/common-prefix

    DownloadsWeekly Downloads

    0

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    2.4 kB

    Total Files

    4

    Last publish

    Collaborators

    • wolfram77