MCPcopy Create free account
hub / github.com/denoland/std / code

Function code

internal/styles.ts:22–28  ·  view source on GitHub ↗
(open: number[], close: number)

Source from the content-addressed store, hash-verified

20const enabled = !noColor;
21
22function code(open: number[], close: number): Code {
23 return {
24 open: `\x1b[${open.join(";")}m`,
25 close: `\x1b[${close}m`,
26 regexp: new RegExp(`\\x1b\\[${close}m`, "g"),
27 };
28}
29
30function run(str: string, code: Code): string {
31 return enabled

Callers 8

boldFunction · 0.70
redFunction · 0.70
greenFunction · 0.70
yellowFunction · 0.70
whiteFunction · 0.70
brightBlackFunction · 0.70
bgRedFunction · 0.70
bgGreenFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected