ansi-truncate
A tiny function for truncating a string that may contain ANSI escape sequences.
Last updated 3 years ago by fabiospampinato .
Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install ansi-truncate 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |