@saorcode/postcode-utils

0.0.2 • Public • Published

postcode-utils

A collection of utilities for dealing with postcodes formatted for the Republic of Ireland.

Installation

npm install @saorcode/postcode-utils --save

Usage

Validating and parsing a postcode

import { parsePostcode } from "@saorcode/postcode-utils"

let postcode = parsePostcode("Y35 KD93")
let { routingKey, identifier} = postcode

console.log(`Routing key: ${routingKey}`)
console.log(`Identifier: ${identifier}`)
console.log(`Matches known routing key? ${postcode.routingKeyIsKnown}`)

License

Licensed under the MIT license. See LICENSE.md for terms.

Readme

Keywords

none

Package Sidebar

Install

npm i @saorcode/postcode-utils

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

9.47 kB

Total Files

7

Last publish

Collaborators

  • sigkell