You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A work in progress NUBAN lib (Nigerian Universal Bank Account Number)
Contains
Validator
Generator / Calculator
Check digit calculator
Usage examples
importcom.solnaranu.ngn._
...
NUBAN.generate() // generated construction-valid NUBANNUBAN.generate(bankCode ="044") // generate construction-valid NUBAN for bank code 044NUBAN.generate(bankCode =Bank.random().code) // generate construction-valid NUBAN for a random (but real) bank codeNUBAN.calculate(accountNumber ="172318511", bankCode ="033") // calculate NUBAN for account number and bank coudeNUBAN.calculateCheckDigit(accountNumber ="172318511", bankCode ="033") // calculate NUBAN check digit for account number and bank codeNUBAN.validate(nuban ="1723185117", bankCode ="033") // validate NUBAN for bank code 033AccountNumber.generate() // generate random account number (just random 9 digits)AccountNumber.validate("987654321") // validate account numberBankCode.random() // random, but real, bank codeBankCode.validate("123") // validate bank codevalimaginaryBank=Bank("Imaginary Bank", "999") // construct bank instancevalrealBank=Bank.random() // get a random, but real, bankvalbanks=Bank.All// get a list of all banks
...