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

ibankit

v1.6.3

Published

Validation, field extraction and creation of IBAN, BBAN, BIC numbers

Downloads

102,811

Readme

ibankit

npm version License

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

Key Features

  • Drop-in replaceable with iban-js
  • Currently conformant with Version 95 (July 2023) 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
  • Full TypesScript support
  • No external dependencies

SWIFT IBAN Registry

This release should be compatible with the SWIFT IBAN Registry Version 95. There may be a limited number of value differences, some countries in the Registry doesn't describe bank/branch information but may expose it as 3!n4!n but leave the branch description as a blank.

IBAN quick examples

// How to generate IBAN
const ibanStr = new IBANBuilder()
  .countryCode(CountryCode.AT)
  .bankCode("19043")
  .accountNumber("00234573201")
  .build()
  .toString();

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

// The library ignores spaces in IBANs, this is valid
const iban = new 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 IBANBuilder().countryCode(CountryCode.AT).bankCode("19043").build();

// 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

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

References

  • http://en.wikipedia.org/wiki/ISO_13616
  • http://en.wikipedia.org/wiki/ISO_9362
  • https://www.swift.com/resource/iban-registry-pdf
  • https://docs.oracle.com/cd/E18727_01/doc.121/e13483/T359831T498954.htm
  • https://en.bitcoinwiki.org/wiki/International_Bank_Account_Number
  • https://github.com/globalcitizen/php-iban/issues/39

Credits

License

Copyright 2018-2023 David Koblas

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