Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arhs/iban.js
IBAN & BBAN validation, formatting and conversion in Javascript
https://github.com/arhs/iban.js
Last synced: about 2 months ago
JSON representation
IBAN & BBAN validation, formatting and conversion in Javascript
- Host: GitHub
- URL: https://github.com/arhs/iban.js
- Owner: arhs
- License: mit
- Created: 2013-11-21T15:21:55.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-08-23T16:13:35.000Z (about 3 years ago)
- Last Synced: 2024-05-29T11:38:44.775Z (4 months ago)
- Language: JavaScript
- Homepage: https://arhs.github.io/iban.js/
- Size: 865 KB
- Stars: 533
- Watchers: 22
- Forks: 129
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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)>
> This library is not maintained anymore
># 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
// the API is now accessible from the window.IBAN global object
IBAN.isValid('hello world'); // false
IBAN.isValid('BE68539007547034'); // true```
### 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
///
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)