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

@asksoma/location

v1.1.2

Published

AskSoma location stack — city geocode (Open-Meteo → Nominatim → Photon), Google Maps link parse, IANA/TZ helpers, GPS detect, and React LocationSearch (Leaflet). No Google Places API key.

Downloads

34

Readme

@asksoma/location

AskSoma place search — no Google Places API key.

City autocomplete (Open-Meteo → Nominatim → Photon), Google Maps / goo.gl paste, Leaflet Advanced modal, IANA timezone helpers, GPS detect, and React pickers.

Install

npm i @asksoma/location leaflet lucide-react
# or via partner kit
npm i @asksoma/partner@latest

Headless (Node / Deno / browser)

import {
  geocodeWithFallback,
  geocodeCitySilent,
  parseGoogleMapsLink,
  inferIanaFromLocation,
  resolveBirthIanaTimezone,
  resolveChartLocation,
  resolveChartLocationAsync,
  detectCurrentCity,
  locationCspConnectSrc,
} from '@asksoma/location';

const hits = await geocodeWithFallback('Mumbai', 10);

// Sync (muhurat / event pickers — snappy; infer IANA if Open-Meteo omitted TZ)
const chart = resolveChartLocation({
  name: hits[0].display_name,
  lat: +hits[0].lat,
  lng: +hits[0].lon,
  timezone: hits[0].timezone,
});

// Async (birth charts — enrichTimezone defaults true when Maps/Nominatim omit IANA)
const birth = await resolveChartLocationAsync({
  name: hits[0].display_name,
  lat: +hits[0].lat,
  lng: +hits[0].lon,
  timezone: hits[0].timezone,
  enrichTimezone: true,
});
// → feed birth.lat / birth.lon / birth.tz into AskSomaClient.muhurat({ chart })

TZ policy: sync resolveChartLocation for UI speed; async enrich for birth/legal timing. See docs/LOCATION_SDK_HANDOFF.md.

React

import { LocationSearch, BirthLocationPicker } from '@asksoma/location/react';

<LocationSearch
  onLocationSelect={(name, lat, lng, countryCode, timezone) => {
    const resolved = resolveChartLocation({ name, lat, lng, countryCode, timezone });
    // …
  }}
/>

<BirthLocationPicker
  showCurrentLocation
  onSelect={(loc, iana) => { /* birth_data.birthLocation + IANA */ }}
/>

Design split

| Module | Runs where | Why | |--------|------------|-----| | Headless geocode + Maps parse + TZ | Node / Deno / browser | Partners, bots, workers | | React LocationSearch / BirthLocationPicker | Browser only | Leaflet + OSM + Advanced modal |

Do not put Leaflet inside @asksoma/astro-client — keep location separate so Muhurat embed can swap manual lat/lon for the real picker without pulling chat/astro.

CSP

Allowlist (see locationCspConnectSrc()): Open-Meteo, Nominatim, Photon, *.tile.openstreetmap.org, ipapi.co.

Vite proxy (dev)

proxy: {
  '/geocoding-proxy/open-meteo': { target: 'https://geocoding-api.open-meteo.com', changeOrigin: true, rewrite: (p) => p.replace(/^\/geocoding-proxy\/open-meteo/, '') },
  '/geocoding-proxy/nominatim': { target: 'https://nominatim.openstreetmap.org', changeOrigin: true, rewrite: (p) => p.replace(/^\/geocoding-proxy\/nominatim/, '') },
  '/geocoding-proxy/photon': { target: 'https://photon.komoot.io', changeOrigin: true, rewrite: (p) => p.replace(/^\/geocoding-proxy\/photon/, '') },
}