Socket
Socket
Sign inDemoInstall

iban

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    iban

A javascript library to validate, format and convert IBAN (International Bank Account Number) and BBAN (Basic Bank Account Number)


Version published
Maintainers
1
Install size
25.8 kB
Created

Readme

Source

npm version GitHub license

iban.js

IBAN and BBAN validation, formatting and conversion in Javascript. Check the demo on demo page to try it.

IBAN.js follows the ISO 13616 IBAN Registry technical specification.

Usage

IBAN.js is compatible with both commonjs and AMD module definition. It can be used as a node.js module and in the browser. It also has a bower manifest, a Typescript definition and a Meteor wrapper.

In node.js

var IBAN = require('iban');
IBAN.isValid('hello world'); // false
IBAN.isValid('BE68539007547034'); // true

In the browser

Using a module loader (AMD or commonjs) or directly through the global IBAN object:

<script src="iban.js"></script>
<script>
    // the API is now accessible from the window.IBAN global object
    IBAN.isValid('hello world'); // false
    IBAN.isValid('BE68539007547034'); // true
</script>

With TypeScript

The library is also available from the typescript language. To do this, download the definition and add a reference to this:

/// <reference path="iban.d.ts" />
IBAN.isValid('hello world');
IBAN.isValid('BE68539007547034');

With Meteor framework

A wrapper package for the Meteor framework is available here.

API

* isValid(iban)
* toBBAN(iban, separator)
* fromBBAN(countryCode, bban)
* isValidBBAN(countryCode, bban)
* printFormat(iban, separator)
* electronicFormat(iban)

FAQs

Last updated on 05 Feb 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc