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

obf-node

v1.0.8

Published

Node.js implementation of the Open Board Format (OBF) validator and converter

Readme

OBF Node

npm version License: MIT API Documentation

Node.js implementation of the Open Board Format (OBF) validator and converter. This tool allows you to validate OBF/OBZ files and convert them between various formats including PDF, PNG, SFY, and SGRID.

Installation

npm install
npm run build

CLI Usage

Validate a file

obf-node validate path/to/board.obf

Supported formats for conversion to OBF:

  • .sfy (Sensory Grid Player)
  • .sgrid (Sensory Grid)
  • .ce (TouchChat)
  • .spb / .sps (Snap)
  • .gridset (Grid3)
  • .obz (Open Board Zip)
  • .obf (Open Board Format)
  • .json (Generic OBF JSON)

Convert between formats

You can convert from OBF, OBZ, SFY, SGRID, TouchChat (.ce), Snap (.spb/.sps), or Grid3 (.gridset) to PDF, PNG, OBF, or OBZ.

Note: The SFY and SGRID converters are ported from the original Ruby codebase and serve as demonstration of how native/proprietary AAC formats can be converted to the Open Board Format.

# Convert OBF to PDF
obf-node convert path/to/board.obf output.pdf

# Convert OBZ to PNG
obf-node convert path/to/board.obz output.png

# Convert SFY to OBZ (packages the board with its assets)
obf-node convert path/to/board.sfy output.obz

# Convert SGRID to OBF
obf-node convert path/to/board.sgrid output.obf

Library Usage (TypeScript/ESM)

import { Validator, PdfBuilder, Utils, External } from 'obf-node';

// Validate
const result = await Validator.validate_file('path/to/board.obf');
console.log(result.valid ? 'Valid!' : 'Invalid');

// Load and Convert
const board = await Utils.load_obf('path/to/board.obf');
await PdfBuilder.build(board, 'output.pdf');

// Package OBF into OBZ
await External.to_obz(board, 'output.obz');

Browser Usage

The library is now universal and can be used in the browser. File-system based methods (validate_file, load_obf) are only available in Node.js, but you can use validate_content and load_obf_content with a Buffer, Uint8Array, or Blob.

import { Validator, Utils } from 'obf-node';

const file = // ... get from input type="file"
const arrayBuffer = await file.arrayBuffer();
const uint8Array = new Uint8Array(arrayBuffer);

// Validate content
const result = await Validator.validate_content(uint8Array, file.name, file.size);

// Load OBF data
const board = await Utils.load_obf_content(uint8Array, file.name);

Development

  • npm run build: Compile TypeScript to dist
  • npm run dev: Run the CLI directly from TS source using ts-node
  • npm test: Run tests
  • npm run lint: Lint the codebase
  • npm run format: Format the codebase with Prettier

Requirements for PNG Conversion

PNG conversion currently requires ImageMagick (convert command) to be installed on your system.

License

Licensed under the MIT License.