Financial Institutions
Repository with all financial institutions
Instituitions supported
- Banks
- Brazil
How to install
$ yarn add @vtex/financial-institutions
Usage
Global
banksFrom(country: string).list()
import { banksFrom } from '@vtex/financial-institutions'
// list with all brazilian banks, ordered by code
console.log(banksFrom('br').list())
banksFrom(country: string).nameByCode(code: string)
import { banksFrom } from '@vtex/financial-institutions'
// prints BANCO DO BRASIL
console.log(banksFrom('br').nameByCode('001'))
Brazil
padBranchNumber(branchNumber: string | number): string
Some times we need to handle branch numbers as numeric type and format it for an standard pattern used in brazil.
import { padBranchNumber } from '@vtex/finantial-institutions/lib/br'
// prints 0012
console.log(padBranchNumber(12))
padBankCode(bankCode: string | number): string
Some times we need to handle bank code as numeric type and format it for an standard pattern used in brazil to visualize or query it.
import { padBankCode } from '@vtex/finantial-institutions/lib/br'
// prints 001
console.log(padBankCode(1))
Contributing
Follow the steps on CONTRIBUTING.md.
License
MIT