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

@jsm-mit/map-places-package

v0.1.0

Published

The package of map-places: address search (autocomplete) and reverse geocoding from an IC canister that holds an OpenStreetMap index.

Readme

@jsm-mit/map-places-package

The package of map-places: address search (autocomplete) and reverse geocoding from the map-places-rust canister — an OpenStreetMap index of Nordrhein-Westfalen (© OpenStreetMap contributors, ODbL) inside an Internet Computer canister. The canister answers anyone (anonymous queries, no cost to the caller). Not published under this name yet: 0.1.0 was published as @jsm-mit/tigi-geo-package.

import { errorKeyOf, isTimeoutError, MapPlacesActor } from "@jsm-mit/map-places-package";

const geo = new MapPlacesActor(canisterId);          // mainnet by default
const search = await geo.searchPlacesAsyncUnsafe("Domkloster 4 Köln", {
    near: position,                                // { lat, lng }: nearest first
    limit: 5,                                      // default 5, at most 10
    lang: "pl",                                    // "en" / "pl" names where OSM has them
    timeoutMs: 3_000,
});
// search.places[i]: { label, area, location: { lat, lng }, kind }   like the front's Place
// search.nearInArea === false → the rider is outside the index: ask Photon instead

const pin = await geo.reverseAsyncUnsafe(point);   // { label: "Domkloster 4, Köln", area, location, kind, meters } | null

The front falls back to Photon / Nominatim when the canister throws, when nearInArea is false, when places is empty, or when reverseAsyncUnsafe gives null.

Errors: CanisterError with errorKeyOf(error) = NotReady (no index yet, or one of an older format right after an upgrade), InvalidData (a point that is not on Earth); Timeout (isTimeoutError); CriticalCanisterError (transport). A stopped canister (an upgrade runs, IC0508/IC0509) is waited out within the time limit.

Local replica: new MapPlacesActor(localId, { host: "http://127.0.0.1:4943" }).

Scripts

  • npm run test-unit — no canister.
  • npm run test-smoke — the canister from this tree on the LOCAL replica (deploys it, uploads the newest data/*.tgi when the active index differs).
  • npm run sync-declarations — declarations/map-places/ from ../map-places-rust.did.
  • npm run publish-public — human-run; see the script for its refusals.

new MapPlacesActor() talks to the STAGE canister 4ogx7-4iaaa-aaaag-azhiq-cai (crafting-table slot backend8, NRW index); give another id (and { host }) for a local replica.