You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@shikijs/engine-oniguruma

Package Overview
Dependencies
Maintainers
3
Versions
59
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

3.8.1
latest
Source
npmnpm
Version published
Weekly downloads
2.5M
4.72%
Maintainers
3
Weekly downloads
 
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

shiki

FAQs

Package last updated on 17 Jul 2025

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