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

goboard-sdk

v0.2.1

Published

Go board core SDK: rules, SGF, Raphael board and players

Readme

goboard-sdk

围棋棋盘核心 SDK:规则引擎、SGF、Raphael 棋盘与各类 Player。

安装(开发中)

pnpm add goboard-sdk
# 或本地联调
pnpm add ../path/to/goboard-sdk

运行 Examples

examples 通过 Vite 演示,默认 alias 到 dist 产物(更接近真实消费方):

pnpm install
pnpm build   # 需先有 dist
pnpm dev     # http://localhost:5173

联调源码时,把 examples/vite.config.ts 里的 alias 改回 ../src/index.ts,改库代码即可热更新,不必每次 build。

代码规范

  • ESLint:eslint.config.js(flat config + typescript-eslint + prettier 兼容)
  • Prettier:.prettierrc.json
  • Git pre-commit(husky):对暂存文件跑 lint-staged(eslint --fix + prettier --write)

现有代码里不少历史写法先以 warning 放行,避免一上来堵死 commit;后续可逐步收紧规则。

最小用法

import { GoboardBranchPlayer, SgfTree } from 'goboard-sdk'

const sgfTree = new SgfTree('(;GM[1]FF[4]SZ[19])')
const player = new GoboardBranchPlayer({
  el: document.getElementById('board'),
  boardOptions: { showCoordinates: true },
})

player.init({ sgfTree, whoFirst: 1, boardSize: 19 }, { showCoordinates: true })

导出

  • Go / Color — 规则
  • SgfTree / SgfNode / SgfMoveNode — SGF
  • Goboard — 棋盘绘制
  • GoboardPlayer*Player — 业务控制层

无 DOM / Raphael 的纯逻辑与 Player 可从子路径引入(适合 3D 等非 SVG 视图):

import { Go, GoboardPlayer, SgfTree } from 'goboard-sdk/core'

const player = new GoboardPlayer({ boardOptions: { showOrder: false } })
player.setBoard(myHeadlessBoard) // 实现 BoardView
player.loadSgf(sgf, 1)

主入口 goboard-sdk 仍默认创建 Raphael Goboard

目录

src/           # 库源码
examples/      # Vite 演示(不进入 npm 包)
dist/          # 构建产物(npm 发布内容)