Skip to content

Async NAPI based interface for libpostal

Notifications You must be signed in to change notification settings

kyr0/postal-async

 
 

Repository files navigation

NPM version Build Status

postal-async

Async NAPI based interface for libpostal

Install

$ npm install --save postal-async

Usage

const { parse, expand } = require('postal-async');


expand('781 Franklin Ave Crown Hts Brooklyn NY', function(err, expansions) {
  // expansion is an array of expanded addresses
  assert(expansions.includes('781 franklin avenue crown heights brooklyn new york'));
});

parse('781 Franklin Ave Crown Hts Brooklyn NY', function(err, parsed) {
  // parsed is an object with house_number, street etc.
  assert(parsed.find(({ value, label }) => label === 'house_number' && value === '781'));
});

License

MIT © Damian Krzeminski

About

Async NAPI based interface for libpostal

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 49.8%
  • JavaScript 22.6%
  • CMake 21.1%
  • Makefile 4.4%
  • C 2.1%