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 🙏

© 2024 – Pkg Stats / Ryan Hefner

costa-rica-iban

v2.0.0

Published

<img src="https://upload.wikimedia.org/wikipedia/commons/f/f2/Flag_of_Costa_Rica.svg" alt="imagen de la bandera de costa rica" width="200" height="200">

Downloads

15

Readme

Costa Rica IBAN

Tests

All Contributors

Funciones de Typescript/Javascript útiles para extraer y validar información general de números de cuenta IBAN de Costa Rica.

Esta herramienta fue creada en base al documento Codificaciones Generales Del Sistema De Pagos del Banco Central de Costa Rica (BCCR). El Jupyter Notebook usado para la extracción de datos puede ser visualizado en este enlace.

Herramienta en línea

Para validar números de cuenta IBAN y extraer información sobre las entidad bancaria emisora, puede hacerse uso de la siguiente página oficialmente mantenida por los colaboradores de este repositorio:

https://costaricaiban.org

Uso con Node.js

Instalación pnpm:

$ pnpm add costa-rica-iban

Instalación yarn:

$ yarn add costa-rica-iban

Instalación npm:

$ npm install costa-rica-iban

Uso de funciones:

import {
  getBankNameFromIBAN,
  getBankObjectFromIBAN,
} from 'costa-rica-iban';


// Cuenta IBAN en entidad bancaria sin representante:
let bankAcct = 'CR06010200009123456789';

console.log(getBankNameFromIBAN(bankAcct));
// > BAC San José S.A.


// Cuenta IBAN en entidad bancaria con representante:
bankAcct = 'CR06083700009123456789';

console.log(getBankNameFromIBAN(bankAcct));
// > Credomatic

console.log(getBankNameFromIBAN(bankAcct), true);
// > BAC San José S.A.


console.log(getBankObjectFromIBAN(bankAcct));
// >
// {
//   "code": "837",
//   "entity": "Credomatic",
//   "category": "ENTIDAD LIQUIDADORA DE SERVICIOS Y EMISORA DE TARJETAS",
//   "participation": "representada",
//   "representative": "BAC San José S.A."
// }

Funciones disponibles:

  • getCountryPrefixFromIBAN(iban)
  • verifyIBANCountryPrefix(iban)
  • verifyIBANLength(iban)
  • verifyIBANFormat(iban)
  • getBankCodeFromIBAN(iban)
  • getBankObjectFromIBAN(iban)
  • getBankCategoryFromIBAN(iban)
  • getBankNameFromIBAN(iban, returnRepresentative = false)

Uso de clase:

import CostaRicaIBAN from 'costa-rica-iban';

const cri = new CostaRicaIBAN('CR06010200009123456789');

console.log(cri.getBankObject());
// >
// {
//   "code": "102",
//   "entity": "BAC San José S.A.",
//   "participation": "asociada",
//   "representative": ""
// }

Funciones de clase disponibles:

  • .getCountryPrefix()
  • .getBankCode()
  • .getBankObject()
  • .getBankCategory()
  • .getBankName()

Para más detalles ver las pruebas en ./src/index.test.ts.

Uso en el navegador

<script src="/dist/costa-rica-iban.min.js"></script>
<script>
  var cri = new CostaRicaIBAN('CR06010200009123456789');

  document.write(cri.getBankObject());
</script>

Desarrollo

Clonar repositorio e instalar dependencias:

$ pnpm

Usamos TDD, por lo tanto se espera que se agreguen las pruebas pertinentes en ./src/index.test.ts.

Nuestro motor de pruebas es Jest. Para ejecutar las pruebas simplemente hace falta correr el comando:

$ pnpm test

Colaboración

Este repositorio tiene activados los issues y pull requests.

Para que un pull request sea tomado en cuenta deberá tener:

  • un issue que describa la funcionalidad existente que esté rota o la funcionalidad nueva propuesta
  • una descripción en el pull request que incluya mención del issue, un detalles de las soluciones/mejoras propuestas, y fuentes usadas para llegar a las soluciones/mejoras propuestas

Colaboradores ✨

Gracias a los colaboradores de este proyecto (emoji key):

Este proyecto sigue la especificación de all-contributors. ¡Colaboraciones de cualquier tipo son bienvenidas!

LICENCIA

Copyright 2020 Jean M. Lescure

Por la presente se concede permiso, libre de cargos, a cualquier persona que obtenga una copia de este software y de los archivos de documentación asociados (el "Software"), a utilizar el Software sin restricción, incluyendo sin limitación los derechos a usar, copiar, modificar, fusionar, publicar, distribuir, sublicenciar, y/o vender copias del Software, y a permitir a las personas a las que se les proporcione el Software a hacer lo mismo, sujeto a las siguientes condiciones:

El aviso de copyright anterior y este aviso de permiso se incluirán en todas las copias o partes sustanciales del Software.

EL SOFTWARE SE PROPORCIONA "COMO ESTÁ", SIN GARANTÍA DE NINGÚN TIPO, EXPRESA O IMPLÍCITA, INCLUYENDO PERO NO LIMITADO A GARANTÍAS DE COMERCIALIZACIÓN, IDONEIDAD PARA UN PROPÓSITO PARTICULAR E INCUMPLIMIENTO. EN NINGÚN CASO LOS AUTORES O PROPIETARIOS DE LOS DERECHOS DE AUTOR SERÁN RESPONSABLES DE NINGUNA RECLAMACIÓN, DAÑOS U OTRAS RESPONSABILIDADES, YA SEA EN UNA ACCIÓN DE CONTRATO, AGRAVIO O CUALQUIER OTRO MOTIVO, DERIVADAS DE, FUERA DE O EN CONEXIÓN CON EL SOFTWARE O SU USO U OTRO TIPO DE ACCIONES EN EL SOFTWARE.