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 🙏

© 2025 – Pkg Stats / Ryan Hefner

quick-route-address-finder

v1.0.5

Published

Quick Route Address Finder

Downloads

11

Readme

Quick Route Address Finder

CI codecov npm version Node.js Version Known Vulnerabilities

A TypeScript library for finding and geocoding Australian addresses using the TomTom Search API. Built with modern ESM modules and full type safety.

Features

  • 🇦🇺 Australia-focused: Optimized for Australian address search
  • 🔍 Fuzzy search: Intelligent matching with configurable fuzzy levels
  • 📍 Geo-biased results: Get more relevant results based on location
  • 🛡️ Type-safe: Full TypeScript support with Zod validation
  • 🚀 Modern: ESM modules, Node.js 20+ support
  • Lightweight: Minimal dependencies
  • 🧪 Well-tested: Comprehensive test coverage

Installation

npm install quick-route-address-finder

Prerequisites

Quick Start

import { addressFinder } from 'quick-route-address-finder';

const results = await addressFinder({
  query: '1 Martin Place Sydney',
  apiKey: 'your-tomtom-api-key',
});

console.log(results.addresses);
// [
//   {
//     formatted: "1 Martin Place, Sydney NSW 2000, Australia",
//     components: { ... },
//     latitude: -33.8688,
//     longitude: 151.2093
//   }
// ]

API Reference

addressFinder(params)

Search for addresses using the TomTom Search API.

Parameters:

| Parameter | Type | Required | Description | | --------- | ---------------------- | -------- | ---------------------------- | | query | string | ✅ | The address search query | | apiKey | string | ✅ | Your TomTom API key | | options | FindAddressesOptions | ❌ | Search configuration options |

Options:

interface FindAddressesOptions {
  limit?: number; // Max results (default: 5)
  minFuzzyLevel?: number; // Minimum fuzzy level (default: 1)
  maxFuzzyLevel?: number; // Maximum fuzzy level (default: 2)
  geoBias?: {
    // Bias results towards a location
    lat: number;
    lon: number;
  };
}

Returns:

{
  addresses: QuickRouteStandardAddress[];
  _raw: TomTomSearchResults; // Raw TomTom API response
}

Address Format:

interface QuickRouteStandardAddress {
  formatted: string; // Human-readable address
  components: object; // Structured address components
  latitude: number; // Latitude coordinate
  longitude: number; // Longitude coordinate
}

Examples

Basic Search

import { addressFinder } from 'quick-route-address-finder';

const results = await addressFinder({
  query: 'Opera House Sydney',
  apiKey: process.env.TOMTOM_API_KEY,
});

console.log(`Found ${results.addresses.length} addresses`);

Advanced Search with Options

const results = await addressFinder({
  query: 'Collins St Melbourne',
  apiKey: process.env.TOMTOM_API_KEY,
  options: {
    limit: 10,
    minFuzzyLevel: 1,
    maxFuzzyLevel: 3,
    geoBias: {
      lat: -37.8136, // Melbourne CBD
      lon: 144.9631,
    },
  },
});

Development

Development Prerequisites

  • Node.js 20.0.0 or higher
  • npm or yarn

Setup

# Clone the repository
git clone https://github.com/jhairau/quick-route-address-finder.git
cd quick-route-address-finder

# Install dependencies
npm install

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Run linting
npm run lint

# Build the project
npm run build

Making Commits

This project uses Conventional Commits and semantic-release for automated versioning.

Use the interactive commit helper:

npm run commit

Or write conventional commits manually:

git commit -m "feat: add new search parameter"
git commit -m "fix: resolve timeout handling"
git commit -m "docs: update API documentation"

For detailed release workflow information, see SEMANTIC_RELEASE.md.

Project Structure

src/
├── addressFinder.ts     # Main API function
├── main.ts             # Public exports
├── types/              # TypeScript type definitions
│   ├── quick-route.ts  # Library types
│   └── tom-tom.ts      # TomTom API types
└── tests/              # Test files
    ├── addressFinder.test.ts
    └── test-data.ts

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Ensure tests pass: npm test
  5. Ensure code quality: npm run lint
  6. Commit using conventional commits: npm run commit
  7. Push to your fork and create a Pull Request

License

MIT © Johnathan Hair