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

jgoboard

v5.0.4

Published

jGoBoard javascript go board library

Readme

jGoBoard v5

Modular JavaScript toolkit for Go (Baduk/Weiqi): board state, rules engine, variation tree, SGF IO, renderer, and embeddable player.

This package is now v5-first. The legacy v4 API (JGO.Board, JGO.Setup, JGO.Record, etc.) is no longer the primary API surface.

Installation

npm install jgoboard

CDN

Global JGO (UMD):

<script src="https://cdn.jsdelivr.net/npm/jgoboard@5/dist/jgoboard.umd.min.js"></script>
<script>
  const game = JGO.createGame({ size: 9 });
</script>

Module import (ESM):

<script type="module">
  import { createGame } from 'https://cdn.jsdelivr.net/npm/jgoboard@5/dist/jgoboard.js';
  const game = createGame({ size: 9 });
</script>

Quick Start

import { createBoard, STONE, createRenderer } from 'jgoboard';

const board = createBoard({ size: 19 });
board.setStone('D4', STONE.BLACK);

const renderer = createRenderer('#board', {
  board,
  theme: 'kaya-medium',
});

await renderer.whenReady();
renderer.render();

Module Entry Points

import { createBoard, createGameTree, createCursor } from 'jgoboard';
// or subpaths
import { createGame, rules } from 'jgoboard/core';
import { createRenderer } from 'jgoboard/renderer';
import { kayaMedium } from 'jgoboard/presets';
import { parseSgf, gameTreeFromSgf, sgfFromGameTree } from 'jgoboard/sgf';
import { createPlayer } from 'jgoboard/player';

Documentation

Demos

  • demoV5Renderer.html
  • demoV5Layers.html
  • demoV5Game.html
  • demoV5Tree.html
  • demoV5Player.html

Run demos in dev mode:

npm install
npm run dev

Then open for example http://localhost:5173/demoV5Player.html.

Development

npm run dev
npm run build
npm run test
npm run lint
npm run format

Build output includes:

  • dist/jgoboard.js (ESM)
  • dist/jgoboard.cjs (CJS)
  • dist/jgoboard.umd.min.js (UMD)
  • dist/core.{js,cjs}, dist/renderer.{js,cjs}, dist/presets.{js,cjs}, dist/sgf.{js,cjs}, dist/player.{js,cjs}
  • dist/*.d.ts

Theme Assets

  • Built-in textured themes (kaya-*, walnut-*) now resolve their image URLs relative to the jGoBoard module/script location.
  • This works out of the box for direct CDN usage, local repo clone demos, and GitHub release dist usage.
  • For custom npm/bundler asset layouts, set assetBaseUrl (globally or per renderer/player instance).
  • bw-* themes do not load image assets.
import { createRenderer, setAssetBaseUrl } from 'jgoboard';

setAssetBaseUrl('/static/vendor/jgoboard/');
// or: createRenderer(target, { board, theme: 'kaya-medium', assetBaseUrl: '/static/vendor/jgoboard/' })

License

Creative Commons Attribution-NonCommercial 4.0 International (CC-BY-NC-4.0).