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

chess-engine-kit

v0.1.0

Published

Engine-neutral browser chess analysis API with a prebuilt Frozenight WASM adapter.

Readme

Chess engine kit

Run chess analysis in a browser worker with a prebuilt Frozenight WebAssembly engine. TypeScript API, move history, up to three candidate lines, progress and cancellation. No analysis server, Rust installation or SharedArrayBuffer required.

The package is experimental. See engine provenance and limitations.

Try the example locally

From this repository, use Node >=22.12 and Bun 1.4.4. The first source build also needs the engine compiler setup: Rust 1.90.0 with the wasm32-unknown-unknown target on your local machine. Later SDK builds reuse the verified local engine cache.

bun install --frozen-lockfile
bun run example:setup
npm --prefix examples/minimal run dev

Open the URL Vite prints. Enter a FEN and optional moves, then analyze or cancel. The minimal example uses the packed npm package and shows scores, candidate lines, progress, terminal positions and errors.

Install in your project

Once published, install the experimental release:

bun add --exact chess-engine-kit@next

The worker, WASM and licenses are included in the package. Bundlers that support new URL("./asset", import.meta.url) discover them directly in node_modules, serve them in development and emit them into the production build. No copy command, extra package scripts or generated files in your source tree are needed. Package tests verify this with Vite 8 and webpack 5. See the API guide for custom URLs, older tooling and deployments without an asset-aware bundler.

Use chess-engine-kit/core for shared types, constants, errors and the generic worker client. The package root exposes the same core API. Import Frozenight from chess-engine-kit/frozenight to include its packaged assets, or use chess-engine-kit/frozenight/manual when your app supplies its own asset URLs. Core and manual imports emit no packaged engine assets.

Analyze a position

Run this in the browser, such as a component's mount hook:

import { API_VERSION } from "chess-engine-kit/core";
import { createFrozenight } from "chess-engine-kit/frozenight";

const engine = createFrozenight();

try {
  await engine.initialize();
  const result = await engine.analyzePosition({
    apiVersion: API_VERSION,
    jobId: crypto.randomUUID(),
    positionId: "opening",
    position: {
      rootFen: "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
      movesUci: ["e2e4", "e7e5"],
    },
    limits: { maxNodes: 100_000, maxTimeMs: 1500 },
    multiPv: 3,
  });
  console.log(result.outcome ?? result.lines);
} catch (error) {
  console.error("Analysis failed", error);
} finally {
  engine.dispose();
}

Positive scores favor White. Centipawn scores use kind: "cp"; mate scores use signed plies. Frozenight requires maxNodes, including when you set a time limit. A budget-limited result contains the last complete iteration and can have no lines. Preserve the root FEN plus moves for repetition history.

Importing the package is SSR-safe; initialize it in a browser. Production hosting needs HTTPS for Web Crypto and a policy allowing same-origin module workers and WebAssembly compilation. The host app owns its board, PGN parsing and offline shell.

See the API guide for cancellation, lifecycle and adapter contracts, development guide for tests and engine rebuilds, and publishing guide for the manual release workflow. User-facing changes are recorded in the changelog.