eircode

1.0.1 • Public • Published

Eircode NPM

Validates Eircodes (Irish postcodes).

Install

  • npm install eircode

Import/require

const eircode = require('eircode');
// OR
import eircode from 'eircode';

Usage

const isEircodeValid = eircode('A42F8G0'); // Returns true;
 
const isEircodeValid = eircode('A32F8G0'); // Returns error: Routing key is Invalid
 
const isEircodeValid = eircode('A32F8G08'); // Returns error: Eircode is too long
 
const isEircodeValid = eircode('A32F880'); // Returns error: Unique identifier is invalid
 

Dependents (0)

Package Sidebar

Install

npm i eircode

Weekly Downloads

0

Version

1.0.1

License

ISC

Last publish

Collaborators

  • robgleeson