MCPcopy
hub / github.com/bugy/script-server / format

Function format

web-src/tests/unit/terminal_test_utils.js:3–9  ·  view source on GitHub ↗
(...styles)

Source from the content-addressed store, hash-verified

1export const escapePrefix = '\u001B[';
2
3export function format(...styles) {
4 if (!Array.isArray(styles)) {
5 styles = [styles];
6 }
7
8 return escapePrefix + styles.join(';') + 'm';
9}
10
11export function moveCursorUp(lines) {
12 return escapePrefix + lines + 'A';

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected