https://github.com/bolajiolajide/ng-banks
Lightweight Zero dependency npm package to get list of banks in Nigeria (Recognized by CBN)
https://github.com/bolajiolajide/ng-banks
banks cbn finance fintech money nigeria nigerian
Last synced: 3 months ago
JSON representation
Lightweight Zero dependency npm package to get list of banks in Nigeria (Recognized by CBN)
- Host: GitHub
- URL: https://github.com/bolajiolajide/ng-banks
- Owner: BolajiOlajide
- Created: 2018-01-21T22:43:24.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T01:15:31.000Z (about 1 year ago)
- Last Synced: 2025-04-27T10:43:44.856Z (7 months ago)
- Topics: banks, cbn, finance, fintech, money, nigeria, nigerian
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/ng-banks
- Size: 344 KB
- Stars: 49
- Watchers: 2
- Forks: 30
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# NG-BANKS
[](https://nodei.co/npm/ng-banks/)
[](https://badge.fury.io/js/ng-banks)
[](https://travis-ci.org/BolajiOlajide/ng-banks)
NG-BANKS is a lightweight zero-dependency npm package that can be used to get the [list](https://www.cbn.gov.ng/Supervision/Inst-DM.asp) of banks in my great country, Nigeria.
## Installation
```bash
> 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
```js
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](https://github.com/BolajiOlajide/ng-banks/contributors) who have contributed to this project.
### License
MIT