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

@truelies/osm-dybuf

v0.2.7

Published

Gridex OSM DyBuf parser and schema utilities

Readme

@truelies/osm-dybuf

Gridex osm.dybuf parser utilities shared by the exporter, inspection scripts, and Next.js frontend.
This package wraps the shared schema tables (schema_ids) and exposes a high-level parseOsmDybuf helper.
It depends on the published dybuf runtime (≥ 0.4.2).

Usage

# from another project (Next.js, Node, etc.)
npm install @truelies/osm-dybuf
import { parseOsmDybuf } from "@truelies/osm-dybuf";
import {
  FEATURE_KIND_IDS,
  REGION_NUMERIC_CODES,
} from "@truelies/osm-dybuf/schema_ids";

const data = await fetch("/tiles/08/213/161/osm.dybuf").then((res) => res.arrayBuffer());
const cell = { level: 8, londex: 213, latdex: 161 };
const parsed = parseOsmDybuf(data, cell);
  • CLI inspection (development only):
    node js/inspect_dybuf.mjs \
        --file /path/to/osm.dybuf \
        --level 8 --londex 213 --latdex 161 --limit 5

Grid helpers (grid_index)

grid_index.ts exposes the minimal Gridex helpers (integers, pole triangles) aligned with the exporter:

import { GridUnit, Gridex, INT_COORD_SCALE } from "@truelies/osm-dybuf/grid_index";

const unit = new GridUnit(8); // level 8
const cell = new Gridex(213, 161);
const [minLon, minLat, maxLon, maxLat] = unit.boundsOfGrid(cell);

Local Development

cd js
npm install      # installs dybuf runtime for this package
  • npm pack: build a tarball so other repos can install via npm install ./path/to/osm-dybuf-*.tgz
  • npm link: link the package locally (npm link here, then npm link @truelies/osm-dybuf in the consumer repo)
  • npm publish --access public: publish to npm (requires the @truelies scope). If the scope is not available, rename package.json"name": "truelies-osm-dybuf" and publish without a scope.

Files

  • osm_dybuf.mjs / .d.mts: DyBuf parser entry points
  • schema_ids.mjs / .d.mts: shared identifiers (geometry, feature, region, segment roles)
  • region_numeric_codes.json: latest region ID table (generated via scripts/dump_region_codes.py)
  • inspect_dybuf.mjs: CLI tool that uses the package locally

When schema IDs or DyBuf layouts change in the exporter, remember to bump the version here and re-publish/install so frontends and tools stay in sync.