Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 193x 193x 193x 193x 193x 193x 193x 542x 542x 542x 542x 542x | import { styleText as nativeStyleText } from 'node:util';
/**
* @param {Parameters<typeof nativeStyleText>[0]} format
* @param {any} value
*/
export function styleText(format, value) {
if (typeof value === 'string') {
return nativeStyleText(format, value);
}
if (typeof value === 'number' || typeof value === 'boolean') {
return nativeStyleText(format, String(value));
}
return '';
}
|