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

bankdata-austria

v1.2300.0

Published

Data and BIC Validator for Austrian Banks

Downloads

14

Readme

bankdata-austria: Data and BIC Validator for Austrian Banks.

Lint, test and build
This TypeScript/JavaScript library is based on the code from baumerdev and provides bank data for Austrian banks, including names and BIC/SWIFT codes. It can be used to improve user interfaces and forms, where users enter an IBAN and the library automatically populates the bank name and BIC fields.

Please note that this library does not serve as an IBAN validator.

Installation

Package Manager

To add this library to your project, use your package manager such as npm. It is recommended to install the latest version explicitly.

$ npm install --save bankdata-austria@latest

Browser / CDN

If you just want the functions in your browser, you can include the following pre-build file.

<script src="https://cdn.jsdelivr.net/npm/bankdata-austria/dist/build/browser.js"></script>

Usage

The npm package contains the code for ESM and CJS, so instead of import, as shown in the usage examples below, you can use require as well.

IBAN / Bank Details

You can get detailed information for a bank by BLZ, BBAN or IBAN.

Note: If you use the BBAN/IBAN function no verification takes place. It just extracts the BLZ and checks if it exists.

import {
  bankDataByBLZ,
  bankDataByBBAN,
  bankDataByIBAN,
} from "bankdata-austria";

bankDataByBLZ("19043");
bankDataByBBAN("02000123456");
bankDataByIBAN("AT872011102000123456");
// {
//   bankName: "Erste Bank der oesterreichischen Sparkassen AG",
//   bic: "GIBAATWWXXX",
//   blz: "20111"
// }

Validation

You can validate BIC/Swift Codes. But even if those formats are international standards this library only validates data for Austria and will return false for all other countries.

import { isValidBIC } from "bankdata-austria";

isValidBIC("MARKDEFF"); // true
isValidBIC("MARKDEFFXXX"); // true
isValidBIC("foobar"); // false (invalid format)
isValidBIC("BNPAFRPH"); // false (corrent but not a Austrian BIC)

Browser / CDN

If you use the pre-build version, an object bankdataAustria is globally defined on window containing the functions.

bankdataAustria.bankDataByBLZ("10010010");
bankdataAustria.bankDataByBBAN("100100100000138301");
bankdataAustria.bankDataByIBAN("DE48100100100000138301");
bankdataAustria.isValidBIC("MARKDEFF");

Data Source

Bank data is taken from the official website of Österreichische Nationalbank .

Package Version

The version numbers are based on Semantic Versioning with modifications.

1.2300.0

The first number representes the Major version. If this number increases there are updates that may not be backward compatiple and you have to adjust your code. That means the above version string is from major version 1.

The first two digits of the second number stand for the year of the included data and check digit methods. The third and fourth digit increase when there are either minor version changes that are backward compatible or when new data is included. That means the above version string is from year 2022 and has had a few minor updates, perhaps data updates for spring and summer.

The last number is for patches and bug fixes.

Since the data may change up to four times a year you should use a suitable version string in your package.json. Since there will be only breaking changes when the first number changes, you should be good with e.g. "1.x"