Socket
Socket
Sign inDemoInstall

@babel/highlight

Package Overview
Dependencies
3
Maintainers
6
Versions
61
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/highlight

Syntax highlight JavaScript strings for output in terminals.


Version published
Maintainers
6
Weekly downloads
49,215,944
decreased by-7.59%

Weekly downloads

Package description

What is @babel/highlight?

The @babel/highlight package is a syntax highlighter for JavaScript code. It can be used to highlight JavaScript syntax with themes for readability, often for displaying code in documentation or web applications.

What are @babel/highlight's main functionalities?

Syntax highlighting

This feature allows you to highlight JavaScript code. You can pass in a string of code and an options object to specify the theme, and it returns an object with a 'value' property containing the highlighted code.

const { highlight } = require('@babel/highlight');
const code = 'const x = 1;';
const highlightedCode = highlight(code, { theme: 'default' }).value;

Other packages similar to @babel/highlight

Changelog

Source

v7.16.7 (2021-12-31)

:eyeglasses: Spec Compliance
  • babel-parser
    • #14049 fix: check preceding line break before exclamation (@JLHwung)
:bug: Bug Fix
  • babel-plugin-transform-runtime, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
    • #14081 Import the correct ./typeof.js helper in @babel/runtime (@exb)
  • babel-helpers
  • babel-helper-function-name, babel-plugin-transform-function-name
:nail_care: Polish

Readme

Source

@babel/highlight

Syntax highlight JavaScript strings for output in terminals.

See our website @babel/highlight for more information.

Install

Using npm:

npm install --save-dev @babel/highlight

or using yarn:

yarn add @babel/highlight --dev

FAQs

Last updated on 31 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc