npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bank-check-br

v1.0.3

Published

Biblioteca Node.js que valida bancos brasileiros e gera ícones SVG usando CSV oficial do Banco Central

Readme

bank-check-br

Test npm version license

Biblioteca Node.js que valida bancos brasileiros e gera ícones SVG usando CSV oficial do Banco Central.

Visão Geral

bank-check-br une em uma única lib:

  • Validação de dados bancários (código de agência, ISPB, nome)
  • Ícones SVG de 40+ bancos brasileiros via @edusites/bancos-brasil
  • Metadados oficiais do CSV do BCB
  • Cache em memória para performance

Instalação

npm install bank-check-br

Uso Básico

import { validarBanco, buscarBanco, listarBancos, gerarSVG } from 'bank-check-br';

// Validar banco por código de agência
const banco = await validarBanco('001');
console.log(banco?.nomeExtenso); // "Banco do Brasil"

// Buscar com SVG incluído
const comSvg = await buscarBanco('001', { includeSvg: true });
console.log(comSvg?.svg); // "<svg>...</svg>"

// Listar todos os bancos
const todos = await listarBancos();

// Gerar SVG diretamente
const svg = gerarSVG('Itaú');

API

Funções de Conveniência

| Função | Descrição | |--------|-----------| | validarBanco(codigo, options?) | Valida e retorna banco por código | | buscarBanco(codigo, options?) | Busca banco por código de agência | | buscarBancoPorISPB(ispb, options?) | Busca banco por ISPB | | buscarBancosPorNome(nome, options?) | Busca bancos por nome | | listarBancos(filters?) | Lista todos os bancos | | listarBancosComIcone(options?) | Lista bancos com ícone SVG | | gerarSVG(nome, options?) | Gera SVG do banco | | recarregarDados() | Recarrega dados do BCB |

Opções

interface BankServiceOptions {
  includeSvg?: boolean;    // Incluir SVG na resposta
  svgOptions?: SVGOptions; // Opções de personalização do SVG
}

interface SVGOptions {
  width?: number;    // Largura do SVG (default: 24)
  height?: number;   // Altura do SVG (default: 24)
  className?: string; // Classe CSS
}

interface BankFilters {
  participaDaCompe?: string; // Filtrar por COMPE
  acessoPrincipal?: string;  // Filtrar por acesso
  comSvg?: boolean;          // Filtrar com ícone
}

Usando o Serviço Diretamente

import { BankService } from 'bank-check-br';

const service = new BankService();
await service.initialize();

const banco = await service.buscarBancoPorAgencia('001');
const comSvg = await service.buscarBancoPorAgencia('001', { includeSvg: true });

Bancos Suportados

A lib mapeia 40+ bancos brasileiros para SVGs:

| Banco | SVG Key | |-------|---------| | Banco do Brasil | bancodobrasil | | Itaú | itau | | Bradesco | bradesco | | Nubank | nubank | | Santander | santander | | C6 Bank | c6 | | Inter | inter | | BTG Pactual | btg | | XP | xp | | ... | ... |

TypeScript

A lib é escrita 100% em TypeScript com tipos completos:

import type { Banco, Participante, BankServiceOptions } from 'bank-check-br';

Build

npm run build    # Build ESM + CJS + DTS
npm test         # Rodar testes
npm run lint     # Verificar código
npm run format   # Formatar código

Licença

MIT

AI Assistant Skill

Esta lib inclui uma skill para assistentes de IA (Codex, Claude Code, etc.).

Instalação Automática

npm run install:skill

Detecta automaticamente o assistente instalado e copia a skill.

Instalação Manual

# Codex/OpenAI
cp -r node_modules/bank-check-br/skill/ ~/.codex/skills/bank-check-br/

# Claude Code
cp -r node_modules/bank-check-br/skill/ ~/.claude/skills/bank-check-br/

O que a skill faz

A skill fornece contexto completo sobre a API, tipos e exemplos de uso para que a AI possa ajudar a:

  • Validar bancos brasileiros
  • Gerar SVGs de bancos
  • Buscar por código de agência ou ISPB
  • Listar bancos com filtros

Autor

Dinho Silva - Desenvolvedor Fullstack

Contribuição

Veja CONTRIBUTING.md para guia de contribuição.