Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shikijs/engine-oniguruma

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shikijs/engine-oniguruma

Engine for Shiki using Oniguruma RegExp engine in WebAssembly

  • 1.24.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is @shikijs/engine-oniguruma?

@shikijs/engine-oniguruma is an npm package that provides Oniguruma regular expression engine support for the Shiki syntax highlighter. It allows for advanced syntax highlighting by leveraging the Oniguruma regex engine, which is known for its powerful and efficient pattern matching capabilities.

What are @shikijs/engine-oniguruma's main functionalities?

Syntax Highlighting

This feature allows you to perform syntax highlighting on code snippets using the Oniguruma regex engine. The code sample demonstrates how to load the Oniguruma WASM module and use the Shiki highlighter to highlight a JavaScript code snippet.

const { getHighlighter } = require('shiki');
const { loadWASM } = require('@shikijs/engine-oniguruma');

async function highlightCode() {
  await loadWASM();
  const highlighter = await getHighlighter({
    theme: 'nord',
    langs: ['javascript']
  });
  const code = `const x = 10;`;
  const highlightedCode = highlighter.codeToHtml(code, { lang: 'javascript' });
  console.log(highlightedCode);
}

highlightCode();

Other packages similar to @shikijs/engine-oniguruma

Keywords

FAQs

Package last updated on 10 Dec 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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc