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

swls-wasm

v0.3.5

Published

The [Semantic Web Language Server](https://github.com/SemanticWebLanguageServer/swls) (Turtle, TriG, SPARQL, JSON-LD) compiled to WebAssembly, plus thin helpers for running it as a worker. Built with `wasm-pack --target web`, so it loads in browsers, bund

Readme

swls-wasm

The Semantic Web Language Server (Turtle, TriG, SPARQL, JSON-LD) compiled to WebAssembly, plus thin helpers for running it as a worker. Built with wasm-pack --target web, so it loads in browsers, bundlers, Web Workers and Node without any bundler plugins.

Both directions exchange whole JSON-RPC messages over postMessage with no Content-Length framing.

Browser / bundler — createSwlsWorker()

The easiest path: get a ready-to-use Web Worker. Works with Vite, webpack, etc. (the bundler picks up the worker and its .wasm automatically).

import { createSwlsWorker } from "swls-wasm/client";

const worker = createSwlsWorker();
// hand `worker` to your editor's LSP client (e.g. swls-codemirror, monaco)

The worker emits { jsonrpc: "2.0", method: "swls/ready" } once the wasm has finished initializing.

From a CDN — no build step

worker.js and its sibling swls_wasm_bg.wasm are both published, so a worker can be loaded straight from a CDN:

const worker = new Worker(
  "https://cdn.jsdelivr.net/npm/[email protected]/worker.js",
  { type: "module" },
);

The worker resolves swls_wasm_bg.wasm relative to its own URL, so it is fetched from the same CDN path. Cross-origin module workers need permissive CORS (jsDelivr and unpkg send it); Safari is stricter about cross-origin worker scripts, so if you need to support it, load a small same-origin bootstrap that import()s the CDN URL.

Custom host — createSwlsServer()

For hosts that aren't a DOM Worker (a Node worker_threads worker, the VS Code web-extension host, …): wire the server to your own transport. post receives each outgoing message (already parsed); feed incoming messages (object or string) into the returned function.

import { createSwlsServer } from "swls-wasm";

const feed = await createSwlsServer((message) => sendToClient(message), {
  debug: (line) => console.log(line),
  // Optional: override how the wasm is loaded. Defaults to fetching the sibling
  // `swls_wasm_bg.wasm`; pass bytes/URL when the host can't fetch that itself
  // (e.g. Node, which can't `fetch` a `file://` URL).
  wasm: undefined,
});

feed({ jsonrpc: "2.0", id: 1, method: "initialize", params: { /* … */ } });

Low-level — WasmLsp

WasmLsp (and the wasm init default export) are also re-exported for full control. createSwlsServer is just a thin wrapper around them.