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

Package detail

@vtex/financial-institutions

vtex220.2.1TypeScript support: included

VTEX Financial Institutions List

vtex, financial-institutions, banks

readme

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[0.2.1] - 2020-07-10

Changed

  • Lib structure

[0.2.0] - 2020-07-10

Added

  • Add brazil specific pad functions

[0.1.2] - 2020-07-03

Changed

  • types path to the right one

[0.1.1] - 2020-07-03

Changed

  • .npmignore to include .github folder

[0.1.0] - 2020-07-03

Added

  • First lib version with all brazilian banks