TypeScript packages for Nigeria's National Digital Postcode.
Docs · Playground · TypeScript guide · Contributing · Discussions
Unofficial. Not made or endorsed by NIPOST.
| Package | What it is | Status |
|---|---|---|
@gatepost/core |
Parse, check and format postcodes offline. | Alpha, not on npm yet |
@gatepost/client |
Call NIPOST's gateway, with retries and limits. | Alpha, not on npm yet |
@gatepost/field |
A postcode field for any web form. | Alpha, not on npm yet |
@gatepost/react |
The postcode field as a React component. | Alpha, not on npm yet |
@gatepost/mock-server |
Mock NIPOST's gateway for client tests. | Private, never goes to npm |
import { parse } from '@gatepost/core';
const parsed = parse('ek 01 a03 fk 01');
if (parsed.ok) {
parsed.value.canonical; // 'EK-01-A03-FK-01'
}The TypeScript guide and the client guide show every function. The reference lists every export.
Read docs/develop.md for the set-up, the checks and the rules for a pull request. Then read the contributing guide.
Apache-2.0. See LICENSE and NOTICE.