# iban

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

Latest version **0.0.14** (published 2020-02-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install iban
pnpm add iban
yarn add iban
bun add iban
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.14 |
| Published | 2020-02-05 |
| First published | 2014-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/iban) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 24.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Laurent VB |
| Maintainers | laurentvb |

## Links

- npm: https://www.npmjs.com/package/iban
- Repository: https://github.com/arhs/iban.js
- Homepage: https://github.com/arhs/iban.js#readme
- Issues: https://github.com/arhs/iban.js/issues
- npm.io page: https://npm.io/package/iban

## Recent versions

- 0.0.14 (latest) — 2020-02-05
- 0.0.13 — 2020-01-27
- 0.0.12 — 2019-02-19
- 0.0.11 — 2018-08-23
- 0.0.10 — 2018-02-07
- 0.0.9 — 2018-02-07
- 0.0.8 — 2017-02-03
- 0.0.7 — 2016-10-10
- 0.0.6 — 2015-11-12
- 0.0.5 — 2014-10-15
- 0.0.4 — 2014-03-17
- 0.0.3 — 2014-02-19
- 0.0.2 — 2014-01-31
- 0.0.1 — 2014-01-31

## README

[![npm version](https://badge.fury.io/js/iban.svg)](https://badge.fury.io/js/iban)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/arhs/iban.js/master/LICENSE)


# iban.js

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

[demo page]: https://arhs.github.io/iban.js/

IBAN.js follows the [ISO 13616 IBAN Registry technical specification](https://www.swift.com/standards/data-standards/iban).

## Usage

IBAN.js is compatible with both commonjs and AMD module definition. It can be used as a [node.js module](#in-nodejs) and [in the browser](#in-the-browser). It also has a bower manifest, a [Typescript definition](#with-typescript) and a [Meteor wrapper](#with-meteor-framework).

### In node.js

```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:

```html
<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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/iban) and add a reference to this:
```typescript
/// <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](https://atmospherejs.com/theduke/iban).


## API

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

---
_Source: https://npm.io/package/iban · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
