Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

iso-7064

EDumdum12.3kMIT1.1.0TypeScript support: included

Implementation of ISO 7064 used in validation of format like IBAN, LEI, ...

ISO 7064, Validation, Check digit, IBAN, LEI, Modulo 97

readme

npm version Build Status Codacy Badge codecov GitHub issues GitHub license

ISO-7064

Implementation of ISO 7064 used in validation of format like IBAN, LEI, ..

Installation

Install using npm:

$ npm install iso-7064

Usage

var iso7064 = require('iso-7064');

iso7064.compute('969500KSV493XWY0PS'); // 54
iso7064.computeWithoutCheck('7245005WBNJAFHBD0S'); // 55

API

compute(rawValue: String) -> Number

Check requirements.
Returns result of modulo 97 applied to the String input rawValue.

Required

  • rawValue must be not Null
  • rawValue must be of type String
  • rawValue must respect format ^[0-9A-Z]{1,}$

computeWithtoutCheck(rawValue: String)-> Number

Does NOT check requirements.
Returns result of modulo 97 applied to the String input rawValue.

Note: Use this method for faster performance if you already did the requirements checks in your code.

Required

  • rawValue must be not Null
  • rawValue must be of type String
  • rawValue must respect format ^[0-9A-Z]{1,}$