0.2.1 • Published 4 years ago

@vtex/financial-institutions v0.2.1

Weekly downloads
40
License
-
Repository
github
Last release
4 years ago

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

0.2.1

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago