Détail du package

iso7064mod9710

stvkoch7MIT1.0.0

Calculate and validate check digits following Norma ISO 7064 Mod 97-10 such as IBAN and NIB validation

boilerplate, npm, module, node

readme

Iso7064 Mod 97 10 Build Status

Calculate and validate numbers to avoid types mistakes, common used by IBAN and NIB.

Install

$ npm install node-iso7064-mod9710

Usage

import { Mod9710 } from 'node-iso7064-mod9710';

Mod9710.encode('794');
//=> 79444

Mod9710.verify('79444');
//=> true

Mod9710.verify('79544');
//=> false

Mod9710.getCheck('79444');
//=> 44

Mod9710.getData('79444');
//=> 794

Mod9710.checkCode('794');
//=> 44

API

verify(number : string) : boolean

Verify if the number is a valid number, well typed.

number

Type: string

IBAN or NIB number or any number generated with check digit mod97-10

encode(number : string) : string

Encode the number with a check digits

number

Type: string

IBAN or NIB number or any number generated with check digit mod97-10

getCheck(number : string) : string

Return the check digits computed by encode method

number

Type: string

IBAN or NIB number or any number generated with check digit mod97-10

getData(number : string) : string

Return the number without the check digit

number

Type: string

IBAN or NIB number or any number generated with check digit mod97-10