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

mainlander

v0.1.0

Published

Browser country/region fingerprint detector library and privacy-first demo.

Readme

mainlander

Browser country/region fingerprint detector lab: a static-first demo for comparing locale, timezone, rendering, device, and optional network signals.

Scope

  • Static/local detector: runs fully in the browser and does not require a backend.
  • Optional network probe: can call public endpoints to reveal what a third-party service sees, including IP-derived country. This is strictly user-initiated: no IP/geolocation endpoint is contacted until the user clicks the probe button.
  • No uploads: local detector results are rendered in the browser and are not uploaded anywhere by this app.
  • Research/demo only: signals are heuristic and should not be used as sole proof of nationality, residence, or eligibility.

Source code: https://github.com/bkmashiro/mainlander

Library usage

The detector is also packaged as a browser-oriented npm library.

npm install mainlander
import {
  countryLabel,
  runLocalDetector,
  runNetworkProbe,
  summarizeNetworkGeo,
} from "mainlander";

const report = await runLocalDetector();
console.log(report.primaryCountryGuess, report.countryScores);

// Only call this after explicit user consent/click.
const network = await runNetworkProbe();
console.log(summarizeNetworkGeo(network));
console.log(countryLabel("GB")); // GB · United Kingdom

runLocalDetector() touches browser fingerprinting surfaces only inside the current page. runNetworkProbe() performs third-party requests and should stay behind an explicit click/consent gate.

Development

pnpm install
pnpm dev
pnpm build

Release / npm publishing

This repo is prepared for npm Trusted Publishing from GitHub Actions, so normal releases do not need an npm token in GitHub Secrets.

Maintainer setup required once on npmjs.com after the first package exists:

  1. Open mainlander package settings on npm.
  2. Add a Trusted Publisher:
    • Provider: GitHub Actions
    • Repository: bkmashiro/mainlander
    • Workflow file: publish-npm.yml
    • Environment: leave blank unless the workflow is later changed to use a GitHub environment.
  3. Trigger Publish npm from GitHub Actions, or push a version tag such as v0.1.1.

Important: npm Trusted Publishing cannot reliably create the very first package version for an unpublished package. If mainlander does not exist on npm yet, publish 0.1.0 once with a temporary/revoked-after-use token, then configure Trusted Publishing for future versions.

Current detector modules

  • Navigator language/platform/user-agent
  • Intl locale/timezone/number/date/collator
  • Date timezone offset
  • Screen and device characteristics
  • Canvas text/canvas hash
  • Emoji rendering probe
  • Font availability probe
  • WebGL vendor/renderer/limits
  • AudioContext fingerprint
  • Storage quota
  • WebRTC candidate probe
  • Optional IP API probe