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

georavity

v1.0.0

Published

Official TypeScript/JavaScript SDK for the Georavity Geospatial API — routing, geocoding, and map tiles.

Readme

@georavity/sdk

Official TypeScript/JavaScript SDK for the Georavity Geospatial API — routing, geocoding, isochrones, and more.

Installation

npm install @georavity/sdk

Quick Start

import { Georavity } from '@georavity/sdk';

const geo = new Georavity('gr_your_api_key');

// Route between two points
const route = await geo.route({
  locations: [
    { lon: 13.388860, lat: 52.517037 }, // Berlin Hauptbahnhof
    { lon: 13.397634, lat: 52.529407 }, // Mauerpark
  ],
  costing: 'auto',
});
console.log(`Distance: ${route.trip.summary.length} km`);
console.log(`Duration: ${route.trip.summary.time} seconds`);

API Reference

Routing

// Standard route
const route = await geo.route({
  locations: [{ lat: 52.52, lon: 13.40 }, { lat: 48.85, lon: 2.35 }],
  costing: 'auto', // 'auto' | 'bicycle' | 'pedestrian' | 'truck'
});

// Optimized route (TSP — visits all locations in optimal order)
const optimized = await geo.optimizedRoute({
  locations: [
    { lat: 52.52, lon: 13.40 },
    { lat: 48.85, lon: 2.35 },
    { lat: 51.50, lon: -0.12 },
  ],
  costing: 'auto',
});

// Distance/time matrix
const matrix = await geo.matrix({
  sources: [{ lat: 52.52, lon: 13.40 }],
  targets: [
    { lat: 48.85, lon: 2.35 },
    { lat: 51.50, lon: -0.12 },
  ],
  costing: 'auto',
});

// Isochrone (reachability polygon)
const iso = await geo.isochrone({
  locations: [{ lat: 52.52, lon: 13.40 }],
  costing: 'auto',
  contours: [{ time: 15 }, { time: 30 }], // 15 and 30 minute contours
  polygons: true,
});

Geocoding

// Forward geocode
const results = await geo.geocode({ text: 'Brandenburg Gate, Berlin' });

// Reverse geocode
const place = await geo.reverse({ 'point.lat': 52.5163, 'point.lon': 13.3777 });

// Autocomplete (for search-as-you-type)
const suggestions = await geo.autocomplete({
  text: 'Bran',
  'focus.point.lat': 52.52,
  'focus.point.lon': 13.40,
});

Error Handling

import { Georavity, GeoravityError } from '@georavity/sdk';

try {
  const route = await geo.route({ ... });
} catch (err) {
  if (err instanceof GeoravityError) {
    console.error(`API Error [${err.code}]: ${err.message}`);
    console.error(`HTTP Status: ${err.status}`);
  }
}

Configuration

const geo = new Georavity('gr_your_api_key', {
  baseUrl: 'https://api.georavity.com', // default
  timeout: 30000, // 30 seconds (default)
});

Costing Models

| Model | Description | |---|---| | auto | Car routing | | bicycle | Bicycle routing | | pedestrian | Walking directions | | truck | Commercial vehicle routing | | bus | Bus routing | | motor_scooter | Scooter routing |

License

MIT — georavity.com