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

hljs-kql

v0.1.0

Published

Kusto Query Language (KQL) grammar for Highlight.js

Readme

hljs-kql

Kusto Query Language (KQL) syntax highlighting for Highlight.js.

KQL is used by Azure Data Explorer, Azure Monitor, Microsoft Sentinel, and other Microsoft data services.

Install

npm install highlight.js hljs-kql

Use

import hljs from "highlight.js/lib/core";
import kql from "hljs-kql";

hljs.registerLanguage("kql", kql);

const result = hljs.highlight(
  "StormEvents | where State == 'FLORIDA' | summarize count()",
  { language: "kql" }
);

The grammar registers kql and kusto as aliases.

Browser distribution

Build and test everything with:

npm install
npm run build

The build script:

  1. Clones Highlight.js 11.11.1 into .cache on the first run.
  2. Links this repository into highlight.js/extra/hljs-kql.
  3. Runs the standalone package tests.
  4. Installs the Highlight.js build dependencies.
  5. Lints the grammar with the Highlight.js ESLint configuration.
  6. Builds Highlight.js for Node.js and runs the third-party markup tests.
  7. Generates dist/kql.min.js and dist/kql.es.min.js.

The cached checkout is reused by later builds and is excluded from Git. Delete .cache if you need to recreate it.

Develop and test

For only the fast standalone tests:

npm install
npm test

Use npm run build before committing grammar or distribution changes. CI runs the same command and rejects stale files in dist.

The grammar follows the official Kusto token grammar and the Highlight.js language contribution guide.

License

MIT