@babel/highlight
Advanced tools
Comparing version 7.0.0-beta.49 to 7.0.0-beta.50
{ | ||
"name": "@babel/highlight", | ||
"version": "7.0.0-beta.49", | ||
"version": "7.0.0-beta.50", | ||
"description": "Syntax highlight JavaScript strings for output in terminals.", | ||
@@ -5,0 +5,0 @@ "author": "suchipi <me@suchipi.com>", |
@@ -5,4 +5,8 @@ # @babel/highlight | ||
See our website [@babel/highlight](https://new.babeljs.io/docs/en/next/babel-highlight.html) for more information. | ||
## Install | ||
Using npm: | ||
```sh | ||
@@ -12,32 +16,6 @@ npm install --save @babel/highlight | ||
## Usage | ||
or using yarn: | ||
```js | ||
import highlight from "@babel/highlight"; | ||
const code = `class Foo { | ||
constructor() | ||
}`; | ||
const result = highlight(code); | ||
console.log(result); | ||
```sh | ||
yarn add --save @babel/highlight | ||
``` | ||
```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 }); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4013
3
20