{"id":22096500,"url":"https://github.com/uphold/uk-modulus-checking","last_synced_at":"2025-07-24T22:32:07.543Z","repository":{"id":52901659,"uuid":"53365716","full_name":"uphold/uk-modulus-checking","owner":"uphold","description":"Validate a UK bank account number against a sort code using the VocaLink modulus check.","archived":false,"fork":false,"pushed_at":"2023-04-09T21:30:44.000Z","size":11350,"stargazers_count":29,"open_issues_count":6,"forks_count":18,"subscribers_count":65,"default_branch":"master","last_synced_at":"2024-11-09T13:47:41.871Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uphold.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-07T23:05:45.000Z","updated_at":"2024-08-18T14:56:45.000Z","dependencies_parsed_at":"2024-06-18T21:32:47.716Z","dependency_job_id":"e2e27274-9bb3-4104-8bb6-1a4169dd00ec","html_url":"https://github.com/uphold/uk-modulus-checking","commit_stats":{"total_commits":32,"total_committers":9,"mean_commits":"3.5555555555555554","dds":0.6875,"last_synced_commit":"4fb15a396352b80dc9e7e29faa7759cbb55d1af5"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fuk-modulus-checking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fuk-modulus-checking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fuk-modulus-checking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fuk-modulus-checking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uphold","download_url":"https://codeload.github.com/uphold/uk-modulus-checking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227482485,"owners_count":17779968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T04:11:20.618Z","updated_at":"2024-12-01T04:11:21.246Z","avatar_url":"https://github.com/uphold.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uk-modulus-checking\nModulus checking allows payment originators to confirm that customer codes and account numbers are compatible before submitting a Bacs Direct Credit of Direct Debit.\n\n## Status\n[![npm version][npm-image]][npm-url] [![build status][travis-image]][travis-url]\n\n## Installation\nInstall the package via `npm`:\n\n```sh\nnpm install uk-modulus-checking --save\n```\n\n## Usage\n\n### `new UkModulusChecking({ accountNumber, sortCode }).isValid()`\n\nThis method validates if the given accountNumber and sortCode represent a valid `Faster Payment Account`.\n\n#### Arguments\n\n1. `accountNumber` *(string)*: The account number to validate.\n2. `sortCode` *(string)*: The sort code to validate.\n\n#### Returns\n*(boolean)*:  Returns `true` if the account is valid.\n\n#### Example\n```js\nnew UkModulusChecking({ accountNumber: '15764273', sortCode: '938063' }).isValid();\n// =\u003e false\n\nnew UkModulusChecking({ accountNumber: '66374958', sortCode: '089999' }).isValid();\n// =\u003e true\n\nnew UkModulusChecking({ accountNumber: '66374958', sortCode: '08-99-99' }).isValid();\n// =\u003e true\n\nnew UkModulusChecking({ accountNumber: '66374958', sortCode: '08-9999' }).isValid();\n// =\u003e true\n```\n\n## Tests\n\n```sh\nnpm test\n```\n\n## Release\n\n```sh\nnpm version [\u003cnewversion\u003e | major | minor | patch] -m \"Release %s\"\n```\n\n## License\nMIT\n\n## Credits\nMany thanks to [bazerk/uk-modulus-checking](https://github.com/bazerk/uk-modulus-checking) for the original inspiration.\n\n[npm-image]: https://img.shields.io/npm/v/uk-modulus-checking.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/uk-modulus-checking\n[travis-image]: https://img.shields.io/travis/uphold/uk-modulus-checking.svg?style=flat-square\n[travis-url]: https://img.shields.io/travis/uphold/uk-modulus-checking.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fuk-modulus-checking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuphold%2Fuk-modulus-checking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fuk-modulus-checking/lists"}