Skip to content

McZen-Technologies/TNRIB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TNRIB (Vérificateur de RIB Tunisie)

GitHub license Google Play Badge

Le RIB (Relevé d'identité bancaire) est un numéro qui identifie d'une manière unique un compte bancaire en Tunisie. Le relevé d'identité bancaire tunisien est constitué d'une série de 20 chiffres.

Voir la démo sur trovit.tn


The BBAN (Basic Bank Account Number) or is a number that uniquely identifies a bank account. The Tunisian BBAN is made up of a series of 20 digits.

See the demo on trovit.tn

Installation

<script src="https://cdn.jsdelivr.net/gh/mczen-technologies/tnrib@latest/tnrib.min.js"></script>

Usage dans le navigateur

console.log(new TNRIB('07040005810111129653').isValid());
// expected output: true

Get IBAN

console.log(new TNRIB('07040005810111129653').iban());
// expected output: 'TN59 07 040 0058101111296 53'

Get SWIFT/BIC code

console.log(new TNRIB('07040005810111129653').bic());
// expected output:  'CFCTTNTT'

Get Account Number

console.log(new TNRIB('07040005810111129653').accountNumber());
// expected output:  '0058101111296'	

Get Bank Name

console.log(new TNRIB('07040005810111129653').bankName());	
// expected output:  'AMEN'	

Get the TNRIB Object

console.log(new TNRIB('07040005810111129653'))
// expected output: 
/*{
	"value": "07040005810111129653",
	"valid": true,
	"iban": "TN59 07 040 0058101111296 53",
	"bic": "CFCTTNTT",
	"accountNumber": "0058101111296",
	"bankName": "AMEN"
  }*/