ng-banks
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

NG-BANKS

NPM npm version Build Status

NG-BANKS is a lightweight zero-dependency npm package that can be used to get the list of banks in my great country, Nigeria.

Installation

> npm install ng-banks --save

Usage

The package is very simple and as of the time of writing has only one method which is to get a list of banks, their corresponding shortcode and their USSD code.

The list of banks contains all banks recognized by the Central Bank of Nigeria (CBN).

Now that we've gotten this out of the way here's an example

const ngBanks = require('ng-banks');

const banks = ngBanks.getBanks();

// get bank by slug or code
console.log(ngBanks.getBank('EBN')); // { name: 'ECOBANK NIGERIA PLC', code: '050', slug: 'EBN', ussd: {code: '*326#' } }
console.log(ngBanks.getBank('063')); // { name: 'ACCESS(DIAMOND) BANK PLC', code: '063', slug: 'DMB', ussd: {code: '*710#' } }

ngBanks.getBank('EBN', function(err, bank) {
  console.log(err, bank); // { name: 'ECOBANK NIGERIA PLC', code: '050', slug: 'EBN', ussd: {code: '*326#' } }
});
ngBanks.getBank('063', function(err, bank) {
  console.log(err, bank); // { name: 'ACCESS(DIAMOND) BANK PLC', code: '063', slug: 'DMB', ussd: {code: '*710#' } }
});

CONTRIBUTORS

See also the list of contributors who have contributed to this project.

License

MIT

Dependencies (0)

    Dev Dependencies (13)

    Package Sidebar

    Install

    npm i ng-banks

    Weekly Downloads

    56

    Version

    2.1.1

    License

    MIT

    Unpacked Size

    235 kB

    Total Files

    25

    Last publish

    Collaborators

    • bolajiolajide