chalk / slice-ansi

Slice a string with ANSI escape codes
MIT License
47 stars 21 forks source link

Use `ansi-styles` module #12

Closed sindresorhus closed 7 years ago

sindresorhus commented 7 years ago

We currently hard-code many ANSI escape codes here: https://github.com/chalk/slice-ansi/blob/6080d303d72bce5da45a870c141188ddb060ab49/index.js#L12-L38 I don't like hard-coded stuff, and it's also outdated, because we added bright colors to ansi-styles. Would be better to use ansi-styles for this. We might have to expose something on ansi-styles, like https://github.com/chalk/ansi-styles/pull/29/files.

sindresorhus commented 7 years ago

// @kevva