npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

highlightjs-verse

v1.2.0

Published

Verse (Epic Games UEFN) language grammar and theme for highlight.js

Readme

highlightjs-verse

npm version CI License: MIT

Verse language grammar and theme for highlight.js.

Verse is the programming language for Unreal Editor for Fortnite (UEFN) by Epic Games. This package adds Verse syntax highlighting support to highlight.js with colors matching Epic's official VS Code extension.

Install

npm install highlightjs-verse highlight.js

TypeScript type definitions ship with the package as of 1.2.0 (no @types/highlightjs-verse or local shim needed).

Usage

ES Modules (React, Vue, Vite, webpack)

import hljs from 'highlight.js/lib/core';
import verse from 'highlightjs-verse';
import 'highlightjs-verse/styles/verse-dark.css';

hljs.registerLanguage('verse', verse);

// Highlight a code string
const result = hljs.highlight(code, { language: 'verse' });

// Or highlight a DOM element
hljs.highlightElement(document.querySelector('code'));

CommonJS (Node.js, SSR)

const hljs = require('highlight.js/lib/core');
const verse = require('highlightjs-verse');

hljs.registerLanguage('verse', verse);

// Server-side render highlighted HTML
const html = hljs.highlight(verseCode, { language: 'verse' }).value;

Browser / CDN

<!-- highlight.js core -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/npm/highlight.js@11/highlight.min.js"></script>

<!-- Verse support (auto-registers, no extra JS needed) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlightjs-verse@1/styles/verse-dark.css">
<script src="https://cdn.jsdelivr.net/npm/highlightjs-verse@1/dist/verse.min.js"></script>

The browser build auto-registers the language — just include the script and go:

<pre><code class="language-verse">
MyDevice := class(creative_device):
    @editable
    Greeting : string = "Hello, Verse!"

    OnBegin<override>()<suspends> : void =
        Print(Greeting)
</code></pre>

Markdown renderers

Works with any markdown renderer that supports highlight.js (markdown-it, marked, rehype, etc.):

import markdownit from 'markdown-it';
import hljs from 'highlight.js/lib/core';
import verse from 'highlightjs-verse';

hljs.registerLanguage('verse', verse);

const md = markdownit({
    highlight: (str, lang) => {
        if (lang === 'verse') {
            return hljs.highlight(str, { language: 'verse' }).value;
        }
        return '';
    }
});

Now ```verse code fences in markdown are syntax highlighted.

What Gets Highlighted

| Token | Examples | Color | |---|---|---| | Block comments | <# nested #> | Green #77B06B | | Line comments | # comment | Green #77B06B | | Strings | "Hello {Name}" | Tan #C09077 | | String interpolation | {expr} inside strings | Gold #B89047 | | Escape sequences | \n, \t, \" | Gold #B89047 | | Numbers | 42, 0xFF, 3.14e2 | Light green #c2ddb4 | | Control keywords | return, yield, break | Blue #569cd6 | | Block keywords | with, do, then, else | Slate blue #8499b7 | | Declaration keywords | var, set, ref, in | Slate blue #8499b7 | | Type specifiers | class, struct, interface | Blue #569cd6 | | Operators | +, ->, =>, := | Teal #77AFAF | | Logical operators | and, or, not | Teal #77AFAF | | Functions/definitions | MyFunc(...), Name : type | Purple #e5c2ff | | Paths | /Fortnite.com/Devices | Blue #569cd6 | | Literals | true, false | Blue #569cd6 | | Punctuation | :, ;, ,, @ | Slate blue #8499b7 |

Theme

The verse-dark theme ships as a standalone CSS file at styles/verse-dark.css. Colors are sourced from Epic Games' official VS Code Verse extension (verse-dark.tmTheme.json).

The theme uses a transparent background, so it layers on top of whatever code block styling your site already has. Pair it with highlight.js's built-in dark themes, or use your own.

Requirements

  • highlight.js >= 11.0.0 (peer dependency)

License

MIT