NZ Bank Account Validator
v0.0.4 - A small, zero dependency Javascript NZ bank account validation library that runs everywhere.
It is based on the documentation provided by the Inland Revenue Department. This library is not however affiliated with or endorsed by the IRD.
Getting Started
Using npm:
$ npm i -g npm$ npm i --save nz-bank-account-validator
Installation
In a browser: (See examples/browser.html for code example)
In Node.js (require):
const bankValidator = ; bankValidator;// => true
ES6 Modules:
; bankValidator;// => true
Usage
const bankValidator = ; bankValidator; // '01'bankValidator; // '02'bankValidator; // '0068389'bankValidator; // '00' bankValidator; // { id: '01', branch: '902', base: '0068389', suffix: '00' } bankValidator // truebankValidator // true bankValidator // falsebankValidator // falsebankValidator // false
Running the tests
To run the tests locally:
npm inpm run tests
Authors
- Josh Hollinshead - Initial work - wytlytningNZ
License
This project is licensed under the MIT License - see the LICENSE.md file for details