Skip to content

Check a UK bank account number against a sort code using the VocaLink modulus check.

Notifications You must be signed in to change notification settings

liamja/modcheck.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modcheck.js Build Status

A Javascript library to check a UK bank account number against a sort code using VocaLink's modulus check.

⚠️ Warning

A passing modulus check does not mean that an account number and sort code exists and is registered to an account holder; it merely confirms the possiblity of an account number being valid for a given sort code.

Building

npm run build

Testing

npm test

Using

Basic usage in a node.js script:

var Modcheck = require('modcheck');

var modcheck = new Modcheck('66374958', '08-99-99');

if (modcheck.check()) {
  console.log('This account number could potentially be registered to this sort code.');
} else {
  console.log('This account number could NOT be registered to this sort code.');
}

Resources

Other Implementations

About

Check a UK bank account number against a sort code using the VocaLink modulus check.

Topics

Resources

Stars

Watchers

Forks