Socket
Socket
Sign inDemoInstall

@babel/highlight

Package Overview
Dependencies
Maintainers
5
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/highlight - npm Package Compare versions

Comparing version 7.0.0-beta.49 to 7.0.0-beta.50

2

package.json
{
"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 });
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc