Sha256: 04f6c4819050ecca725f7d4a87c821ddc5ed799d52b8efa6ca28bf7bcf8131dd
Contents?: true
Size: 682 Bytes
Versions: 1
Compression:
Stored size: 682 Bytes
Contents
# @babel/highlight > Syntax highlight JavaScript strings for output in terminals. ## Install ```sh npm install --save @babel/highlight ``` ## Usage ```js import highlight from "@babel/highlight"; const code = `class Foo { constructor() }`; const result = highlight(code); console.log(result); ``` ```js class Foo { constructor() } ``` By default, `highlight` will not highlight your code if your terminal does not support color. To force colors, pass `{ forceColor: true }` as the second argument to `highlight`. ```js import highlight from "@babel/highlight"; const code = `class Foo { constructor() }`; const result = highlight(code, { forceColor: true }); ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
condenser-0.0.4 | lib/condenser/processors/node_modules/@babel/highlight/README.md |