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

valhalla-server

v0.2.1

Published

Valhalla WASM routing for Node.js and experimental Cloudflare Workers, with on-demand graph tiles.

Readme

valhalla-server

ESM Valhalla WASM routing for Node.js 22.22.2+ and experimental Cloudflare Workers. Both compiled runtimes and TypeScript declarations are included. Graph data stays in object storage and loads on demand; no external routing API is used. Driving, cycling, walking and truck profiles use the same standard graphs as valhalla-browser.

import { createRouter } from 'valhalla-server/node';

const router = await createRouter({
  // Replace with your immutable dataset URL, and use coordinates it covers.
  manifestUrl: 'https://routing.example.com/datasets/your-release-id/manifest.json',
});
try {
  const result = await router.route({
    origin: { lat: 47.0666667, lon: 9.5 },
    destination: { lat: 47.2397558, lon: 9.5262874 },
  });
  console.log(result.native);
} finally {
  await router.dispose();
}

Import valhalla-server/node for a dedicated worker thread, or valhalla-server/cloudflare for a statically imported WASM module with HTTP or private R2 bindings. The package root exports shared types and RoutingError; it does not select a runtime automatically. Browser applications should use valhalla-browser, including direct CDN loading.

The default per-session queue holds eight waiting operations for up to two seconds. The overall operation deadline is 30 seconds, including startup and queue wait. Node active cancellation terminates its thread; Cloudflare uses cooperative native Asyncify checkpoints. Cloudflare requires the current request's execution context on every call.

Both entry points share one compiled WASM binary. Set wasmMemory: { initialMiB: 64, maximumMiB: 96 } in Router options to configure the imported linear memory. Defaults are 256 MiB initial and 512 MiB maximum in Node, or 64 / 96 MiB in Cloudflare. Values must be whole MiB with 64 <= initialMiB <= maximumMiB <= 1024. The hard per-instance ceiling includes native heap, stack and static data; it excludes JavaScript and other isolate overhead. Increasing it does not raise Cloudflare's platform memory limit. The effective values are returned in router.startup.wasmMemory.

Server setup, cancellation, limits and R2 guide · API documentation · Build compatible graph data