Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ng-banks

BolajiOlajide962MIT2.1.1TypeScript support: included

Light-weight zero dependency npm package that helps get nigerian banks

Banks, Nigerian, money, access bank, citibank, access (diamond) bank, ecobank, ecobank, fidelity bank, first bank, globus bank, guaranty trust bank, heritage bank, key stone bank, mainstreet bank, polaris bank, stanbic ibtc bank, standard chartered bank, ng banks, nigeria, sterling bank, suntrust bank, titan trust bank, union bank, union bank, united bank, unity bank, wema bank, zenith bank

readme

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

changelog

CHANGELOG

See commit history on Github for change history

v2.0.0 - 2021-01-06

  • Migrate project to typescript

v1.0.0 - 2017-03-10

  • Add generic banks to the package
  • implement method to get all banks

v1.1.0 - 2018-11-04

  • change bank format to include universal CBN transaction code
  • remove redundant banks such as Skye Bank
  • add method to fetch single bank via slug or code

v1.2.0 - 2018-01-09

  • add callback functionality - giving the user ability to fetch response via callbacks or normally
  • make use of a json data store instead of just a script
  • add helper functions to the NGBanks class

v1.3.0 - 2018-01-09

  • remove non-existent banks
  • update the database to reflect new banks
  • add CBN bank lists to README for future reference
  • update tests to use proper assertions