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

lance-ts

v1.0.2

Published

Lat/Long from National Census Endpoint. An opinionated, blazingingly fast geocoding library.

Readme

Lance-TS

Opinionated TypeScript client for the U.S. Census Geocoder API.

Turn U.S. addresses into latitude/longitude coordinates using the free Census Bureau Geocoder. Strongly-typed, totally node-native.

Read the docs


Use Case:

If you're working with U.S. address data, the Census Geocoder is an extremely viable, completely free API. Backed by the official MAF/TIGER address database, and covering virtually every U.S. address, it has no posted rate limits and no API key.

The Issue:

The raw Census Geocoder API response is verbose and awkward to work with. Below is the simplest possible response; a single one-line address match:

{"result": {
     "input": {
          "address": {"address": "4600 Silver Hill Rd, Washington, DC 20233"},
          "benchmark": {
               "isDefault": true,
               "benchmarkDescription": "Public Address Ranges - Current Benchmark",
               "id": "4",
               "benchmarkName": "Public_AR_Current"
          }
     },
     "addressMatches": [{
          "tigerLine": {
               "side": "L",
               "tigerLineId": "76355984"
          },
          "coordinates": {
               "x": -76.92748724230096,
               "y": 38.84601622386617
          },
          "addressComponents": {
               "zip": "20233",
               "streetName": "SILVER HILL",
               "preType": "",
               "city": "WASHINGTON",
               "preDirection": "",
               "suffixDirection": "",
               "fromAddress": "4600",
               "state": "DC",
               "suffixType": "RD",
               "toAddress": "4700",
               "suffixQualifier": "",
               "preQualifier": ""
          },
          "matchedAddress": "4600 SILVER HILL RD, WASHINGTON, DC, 20233"
     }]
}}

For applications that require lightweight & simple coordinate responses, lance-ts provides a clean, strongly-typed interface so you can go from address → coordinates in one call.

  • 🆓 Free — no API key, no account, no rate limits
  • 🏛️ Official Data — calls the U.S. Census Bureau Geocoder
  • 📦 Lightweight — no HTTP library dependencies; uses node-native fetch

Installation

# pnpm (recommended)
pnpm add lance-ts

# npm
npm install lance-ts

# yarn
yarn add lance-ts

Requires Node.js 18+ (for native fetch).


Quick Start

import { geocodeOneLineAddress } from "lance-ts";

const result = await geocodeOneLineAddress(
  "1600 Pennsylvania Avenue NW, Washington, DC 20500"
);

if (result) {
  console.log(result.coordinates.x);  // 38.8987...
  console.log(result.coordinates.y);  // -77.0353...
  console.log(result.matchedAddress);  // "1600 Pennsylvania..."
}

How It Works

lance-ts sends your address to the Census Bureau's public REST endpoint:

https://geocoding.geo.census.gov/geocoder/locations/onelineaddress

The response is parsed and normalized, extracting the matched coordinates and canonical address from the Census Bureau's nested JSON structure, and returned as a clean, typed object.


Getting Started

# Install dependencies
pnpm install

# Run tests
pnpm test

# Run tests with UI
pnpm test --ui

Project Structure

lance-ts/
|--src/   # TypeScript source
|--dist/  # Compiled output (generated)
|--tsconfig.json
|--package.json

Limitations

  • U.S. addresses only
  • Coordinate results are interpolated from TIGER address ranges. Very small error margin, but not always rooftop-precise.
  • Reverse geocoding (coordinates -> address) is not yet implemented. Coming soon!

Resources


License

ISC © matt-the-thew