# postal-async

> Async NAPI based interface for libpostal.

Latest version **1.3.1** (published 2024-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install postal-async
pnpm add postal-async
yarn add postal-async
bun add postal-async
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2024-03-06 |
| First published | 2019-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 7 |
| Author | Damian Krzeminski |
| Maintainers | pirxpilot |
| Keywords | libpostal, postal |

## Links

- npm: https://www.npmjs.com/package/postal-async
- Repository: https://github.com/pirxpilot/postal-async
- Homepage: https://github.com/pirxpilot/postal-async#readme
- Issues: https://github.com/pirxpilot/postal-async/issues
- npm.io page: https://npm.io/package/postal-async

## Dependencies (4)

- [bindings](https://npm.io/package/bindings.md) ^1.5.0
- [node-addon-api](https://npm.io/package/node-addon-api.md) ~8
- [prebuild-install](https://npm.io/package/prebuild-install.md) ~7
- [@pirxpilot/cmake-js](https://npm.io/package/@pirxpilot/cmake-js.md) ~5

## Recent versions

- 1.3.1 (latest) — 2024-03-06
- 1.3.0 — 2024-03-05
- 1.2.1 — 2022-06-02
- 1.2.0 — 2021-10-14
- 1.1.1 — 2020-04-21
- 1.1.0 — 2019-07-30
- 1.0.1 — 2019-07-27
- 1.0.0 — 2019-07-27
- 0.0.0 — 2019-07-26

## README

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]

# postal-async

Async NAPI based interface for [libpostal]

## Install

```sh
$ npm install --save postal-async
```

## Usage

```js
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](https://pirxpilot.me)

[npm-image]: https://img.shields.io/npm/v/postal-async
[npm-url]: https://npmjs.org/package/postal-async

[build-url]: https://github.com/pirxpilot/postal-async/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/postal-async/check.yaml?branch=main

[libpostal]: https://github.com/openvenues/libpostal

---
_Source: https://npm.io/package/postal-async · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
