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

@gapwise/sdk

v0.1.1

Published

Official JavaScript and TypeScript client for the Gapwise public campus API

Readme

@gapwise/sdk

Official dependency-free TypeScript client for the unauthenticated Gapwise Public Campus API v1. The SDK is one implementation shared across modern JavaScript runtimes rather than separate Node, Deno, and Bun clients. It defaults to https://api.gapwise.ca/v1.

Distribution and runtime model

The canonical package identity is @gapwise/sdk.

  • npm: @gapwise/[email protected] is published with provenance and is the primary package for Node.js, Bun, browser bundlers, and npm-compatible tooling.
  • JSR: @gapwise/[email protected] is published from the same TypeScript source through GitHub Actions OIDC with provenance. JSR publishes the source entry point directly from src/index.ts.
  • Node.js: supported through the npm package; package metadata requires Node 20+.
  • Bun: first-party test/runtime target using the same package and source.
  • Deno: first-party portability target using the same TypeScript source/package; release verification runs JSR validation and Deno type/runtime checks before publication.
  • Browsers and edge-style runtimes: the client is dependency-free and accepts an injected fetch; compatibility claims should stay evidence-based for each environment.

Python is an equal first-party SDK, not a fallback implementation. It is maintained in ../python and published as gapwise on PyPI. Public API changes must preserve contract parity across the TypeScript and Python clients.

Install the released npm package with:

npm install @gapwise/[email protected]

Install the same released TypeScript SDK from JSR with Deno:

deno add jsr:@gapwise/[email protected]

Or import the exact JSR version directly:

import { Gapwise } from "jsr:@gapwise/[email protected]";

For unreleased repository work, a local checkout can still be installed with npm install ./sdk/javascript.

import { Gapwise, GapwiseApiError } from "@gapwise/sdk";
const gapwise = new Gapwise();

const info = await gapwise.info();
const mn = await gapwise.buildings.get("MN");
const buildings = await gapwise.buildings.list({ q: "instructional", category: "academic" });
const places = await gapwise.places.list({ building: "HM", kind: "library" });
const route = await gapwise.routes.calculate({ from: "MN", to: "IB" });
const plan = await gapwise.gaps.plan({ from: "MN", to: "IB", term: "Fall", weekday: "Wednesday", startTime: 660, endTime: 780 });

// Unknown availability is not closed. Preserve this distinction in your UI.
for (const place of places.data) console.log(place.name, place.availability.state);

Collections return { data, meta }; meta.pagination.nextOffset is null on the last page. Every operation accepts { signal, timeoutMs }. Configure new Gapwise({ baseUrl, fetch, timeoutMs, headers }) for tests, proxies, or other runtimes.

HTTP failures throw GapwiseApiError with status, stable code, optional details, and requestId. Timeouts throw GapwiseTimeoutError; malformed successful responses throw GapwiseResponseError. If an error has code rate_limited, respect the server's retry guidance before retrying.

API v1, campus data versions, npm/JSR package versions, and the Python package version evolve independently at the registry layer but must remain semantically aligned with the same released v1 contract. See ../../docs/DEVELOPER_PLATFORM.md for filtering, uncertainty, privacy, versioning, and legacy migration guidance, and ../../docs/SDK_RELEASE.md for the release process.