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

1.1.2 • Public • Published

ANSI Truncate

A tiny function for truncating a string that may contain ANSI escape sequences.

Install

npm install --save ansi-truncate

Usage

import colors from 'tiny-colors';
import truncate from 'ansi-truncate';

truncate ( colors.red ( 'foo' ), 2 ); // => Same as: colors.red ( 'f…' );

License

MIT © Fabio Spampinato

/ansi-truncate/

    Package Sidebar

    Install

    npm i ansi-truncate

    Weekly Downloads

    22,286

    Version

    1.1.2

    License

    none

    Unpacked Size

    6.35 kB

    Total Files

    15

    Last publish

    Collaborators

    • fabiospampinato