Narcissistic, Perfectly Modest
    Wondering what’s next for npm?Check out our public roadmap! »

    truncate-url
    TypeScript icon, indicating that this package has built-in type declarations

    2.1.0 • Public • Published

    truncate-url

    Truncate a URL to a specific length

    Install

    $ npm install truncate-url
    

    Usage

    import truncateUrl from 'truncate-url';
    
    truncateUrl('https://sindresorhus.com/foo/bar/baz/faz', 30);
    //=> 'https://sindresorhus.com/…/faz'

    Install

    npm i truncate-url

    DownloadsWeekly Downloads

    1,150

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    3.42 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar