( str: string, start: number, end: number, )
| 8 | import chalk from 'chalk'; |
| 9 | |
| 10 | export default function colorize( |
| 11 | str: string, |
| 12 | start: number, |
| 13 | end: number, |
| 14 | ): string { |
| 15 | return ( |
| 16 | chalk.dim(str.slice(0, start)) + |
| 17 | chalk.reset(str.slice(start, end)) + |
| 18 | chalk.dim(str.slice(end)) |
| 19 | ); |
| 20 | } |
no test coverage detected