New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uk-modulus-check

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uk-modulus-check

## Overview

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6K
increased by23.89%
Maintainers
0
Weekly downloads
 
Created
Source

UKModulusCheck

Overview

TypeScript class that validates UK bank account details using the modulus checking algorithm.

It only users vanilla typescript, and the 'fs' file-loading library.

From time to time, Vocalink updates the txt files here mapping sort-code ranges to validation weights. We currently use v7-90 (valid from 17 August 2024).

Installation

npm install uk-modulus-check

Usage

const ModulusChecker = require('uk-modulus-check');

const modulusChecker = new ModulusChecker();

console.log(modulusChecker.check('180002', '00000190')); // true

console.log(modulusChecker.check('938063', '15763217')); // false

', accountNumber: '', expectedResult: true

Details

This specification details logic to differentiate valid vs. invalid pairs of sort-code and account number.

A mathematical algorithm compares the two values, and check if the two can be paired together legitimately.

This page details any changes to the specification.

License

MIT

Credits

Many thanks to bazerk/uk-modulus-checking for inspiration (Python)

Also thanks to uphold/uk-modulus-checking for creating a good Javascript implementation. It doesn't seem to be updated since valacdos-v640, which motivats the create (12/10/2020)

FAQs

Package last updated on 18 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc