MCPcopy Create free account
hub / github.com/babel/babel / codeFrameColumns

Function codeFrameColumns

packages/babel-code-frame/src/index.ts:13–32  ·  view source on GitHub ↗
(
  rawLines: string,
  loc: NodeLocation,
  opts: Options = {},
)

Source from the content-addressed store, hash-verified

11export type { Options };
12
13export function codeFrameColumns(
14 rawLines: string,
15 loc: NodeLocation,
16 opts: Options = {},
17): string {
18 const shouldHighlight =
19 opts.forceColor || (isColorSupported() && opts.highlightCode);
20
21 return _codeFrameColumns(
22 rawLines,
23 loc,
24 opts,
25 shouldHighlight
26 ? {
27 defs,
28 highlight,
29 }
30 : undefined,
31 );
32}

Callers 8

runFunction · 0.90
replaceWithSourceStringFunction · 0.90
toContextualSyntaxErrorFunction · 0.90
parseWithCodeFrameFunction · 0.90
parserFunction · 0.90
buildCodeFrameErrorMethod · 0.90
index.jsFile · 0.50
color-detection.jsFile · 0.50

Calls 2

isColorSupportedFunction · 0.90
_codeFrameColumnsFunction · 0.90

Tested by

no test coverage detected