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

quickroute-geo-recommendations

v1.0.31

Published

QuickRoute GeoRecommendations is a TypeScript library that provides address suggestions based on partial inputs.

Readme

QuickRoute GeoRecommendations

Overview

QuickRoute GeoRecommendations is a TypeScript library that provides address autocomplete suggestions based on partial inputs. It currently integrates with TomTom API and OpenStreetMap, offering:

  • Typed and structured responses
  • Support for LTS Node.js environments
  • Australian address filtering
  • Extensibility for future geolocation providers

Features

Address autocomplete via TomTom and OpenStreetMap
Structured location data (country, state, municipality, etc.)
Australian address filtering (for TomTom provider)
Supports multiple geolocation providers
Well-tested with high coverage
Supports easy map local cache


Installation

Refer NPM Package in : https://www.npmjs.com/package/quickroute-geo-recommendations

To install the package, run:

npm install quickroute-geo-recommendations

Usage

1. Import the Library & Initialize a Provider

const { getProvider, ProviderType } = require("quickroute-geo-recommendations");

// ✅ Using TomTom Provider (Requires API key)
const tomtom = getProvider(ProviderType.TomTomMapsProvider, "your-api-key");

tomtom
  .getSuggestions("crescent")
  .then((result) => console.log("TomTom Results:", result))
  .catch(console.error);

// ✅ Using OpenStreetMap Provider (No API key required)
const osm = getProvider(ProviderType.OpenStreetMapsProvider);

osm
  .getSuggestions("crescent")
  .then((result) => console.log("OSM Results:", result))
  .catch(console.error);

API Reference

getSuggestions(query: string): Promise<AddressSuggestion[]>

Retrieves a list of address suggestions based on the query.

Example Response

[
  {
    "address": "123 Crescent St",
    "latitude": -33.8688,
    "longitude": 151.2093,
    "country": "Australia",
    "state": "NSW",
    "municipality": "Sydney",
    "postcode": "2000",
    "placeId": "123"
  }
]

AddressSuggestion Type

type AddressSuggestion = {
  address: string;
  latitude: number | null;
  longitude: number | null;
  country?: string;
  state?: string;
  municipality?: string;
  postcode?: string;
  placeId?: string;
  boundingBox?: [number, number, number, number];
};

Testing

To run the test suite:

npm run test

Test Coverage Report

----------------------------|---------|----------|---------|---------|-------------------
File                        | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------------|---------|----------|---------|---------|-------------------
All files                   |     100 |     85.1 |     100 |     100 |
 providers                  |     100 |    82.05 |     100 |     100 |
  baseGeoProvider.ts        |     100 |    82.35 |     100 |     100 | 19,37-38
  openStreetMapsProvider.ts |     100 |      100 |     100 |     100 |
  tomtomMapsProvider.ts     |     100 |    63.63 |     100 |     100 | 43-52
 services                   |     100 |      100 |     100 |     100 |
  getProvider.ts            |     100 |      100 |     100 |     100 |
 utils                      |     100 |      100 |     100 |     100 |
  error.ts                  |     100 |      100 |     100 |     100 |
----------------------------|---------|----------|---------|---------|-------------------
Test Suites: 3 passed, 3 total
Tests:       17 passed, 17 total
Snapshots:   0 total
Time:        0.534 s, estimated 1 s

Future Enhancements

  • Improve filtering on the API results to make it fast and rank based
  • Deepdive into possible edge cases and error scenarios
  • Support for more geolocation providers (Google Maps, etc.)
  • Enhance rate limiting
  • End to End tests and integration tests
  • Host on API Gateway, Lambda and enable caching using Redis
  • Docker image for easy testing
  • Logging and monitoring using AWS Cloudwatch Insights Dashboard
  • Use current location, autocomplete ranking
  • User intent-based address prediction
  • Support batch processing
  • Extend it to multiple countries with flexible language, output limits

License

This package is licensed under the MIT License.