GithubHelp home page GithubHelp logo

sam-medispring / iban-to-bic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sigalor/iban-to-bic

0.0 0.0 0.0 1.08 MB

Determines the SWIFT BIC of an IBAN.

License: MIT License

JavaScript 100.00%

iban-to-bic's Introduction

iban-to-bic

GitHub license npm Unit tests workflow status

Determines the SWIFT BIC of an IBAN. Currently supports IBANs from the following countries: Austria, Belgium, Germany, Luxembourg, Netherlands, Spain, France.

Usage

const { ibanToBic } = require('iban-to-bic');

const bic = ibanToBic('DE51500105179975341634');
// bic is now "INGDDEFFXXX"

ibanToBic returns undefined if the IBAN is invalid (checked internally using ibantools) or if no corresponding BIC was found.

Usage in the browser

iban-to-bic is really simple to use inside a browser. You can either pull the package from npm and build it with your favorite packaging tool or you can use it from a CDN like this:

<script type="text/javascript" src="https://unpkg.com/iban-to-bic@latest/dist/iban-to-bic.js">

Or

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/iban-to-bic@latest/dist/iban-to-bic.js">

And then invoke it like this:

<script type="text/javascript">
	window.ibanToBic.ibanToBic('********');
</script>

Using this code makes it super comfortable to validate user input and provide auto-fill to your application.

Updating the dataset

The following will fetch the newest data from the respective national bank authorities (e.g. Bundesbank in Germany or OeNB in Austria) and regenerate the files in the datasets and the datasets-extended directory:

npm run generate

For Spain and France, data directly from the European Central Bank is used, see here.

License

MIT

iban-to-bic's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.