Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ibankit

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ibankit

IBAN and BIC utilities

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.3K
decreased by-57.71%
Maintainers
1
Weekly downloads
 
Created
Source

ibankit

CircleCI npm version License

A library for generation and validation of the International Bank Account Numbers (IBAN ISO_13616) and Business Identifier Codes (BIC ISO_9362).

Key Features
  • Drop in replacable with iban-js
  • Currently conformant with Version 80 of the IBAN registry
  • Decodes bank, branch and account numbers from IBAN
  • Supports random BBAN / IBAN generation for testing
  • Has BIC validation as a bonus
  • Supports validation of National Check Digits if part of BBAN format
  • This library provides full TypesScript support
  • No external dependancies
Iban quick examples:
// How to generate Iban
const iban = new IbanBuilder()
  .countryCode(CountryCode.AT)
  .bankCode("19043")
  .accountNumber("00234573201")
  .build();

// How to create Iban object from String
const iban = new IBAN("DE89370400440532013000");

// The library ignores spaces in IBANs, this is valid
const iban = IBAN("DE89 3704 0044 0532 0130 00");

// For testing, the library will also generate random IBANs
const iban = IBAn.random(CountryCode.AT);
const iban = IBAN.random();
const iban = new Iban.Builder()
  .countryCode(CountryCode.AT)
  .bankCode("19043")
  .buildRandom();

// For simplicity in porting from iban-js applications
// you can quickly check validity
IBAN.isValid("AT611904300234573201"); // ===  true
IBAN.isValid("DE89 3704 0044 0532 0130 00"); // == true
IBAN.isValid("hello world"); // == false
Bic quick examples:
// How to create Bic object from String
const bic = BIC("DEUTDEFF");

// Check to see is BIC code is valid
BIC.isValid("DEUTDEFF500"); // === true

TODO

[ ] For random IBANs the National Check digits is random, rather than "valid" [ ] Finish writing all national check digit validators (see Oracle spec)

References
Credits

License

Copyright 2018 David Koblas

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Keywords

FAQs

Package last updated on 12 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc