You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@babel/highlight

Package Overview
Dependencies
Maintainers
4
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/highlight

Syntax highlight JavaScript strings for output in terminals.


Version published
Weekly downloads
53M
decreased by-0.16%
Maintainers
4
Install size
171 kB
Created
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.24.2 (2024-03-19)

:bug: Bug Fix
  • babel-code-frame, babel-highlight
    • #16362 Restore previous FORCE_COLOR=0 behavior (@nicolo-ribaudo)

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

Package last updated on 19 Mar 2024

Did you know?

Socket

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
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc