{"_id":"nhs-number-validator","_rev":"8-9a2d66849c5fe8d9eef8b8c3e729952c","name":"nhs-number-validator","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"nhs-number-validator","version":"1.0.0","keywords":["nhs","validator","validation"],"author":{"name":"Ryan Brooks","email":"ryan@ryanbrooks.co.uk"},"license":"MIT","_id":"nhs-number-validator@1.0.0","maintainers":[{"name":"spikeheap","email":"ryanbrooksis@gmail.com"}],"homepage":"https://github.com/spikeheap/nhs-number-validator#readme","bugs":{"url":"https://github.com/spikeheap/nhs-number-validator/issues"},"dist":{"shasum":"fc3ad95e98de7b23892353a578a0b9c7860c8f98","tarball":"https://registry.npmjs.org/nhs-number-validator/-/nhs-number-validator-1.0.0.tgz","integrity":"sha512-U4s6ozkvSbfBTWCjZKwHu9ZYvF1MIr1e07XEkeOmbCa1NTeKMXHeSUKkzq0eKBQ7hg1wpKMakcyueXstUEQDcA==","signatures":[{"sig":"MEYCIQCop5qGuMqxHFjrapJ6kkoM5oJg+lPuf+dXYvpOdx7MFwIhAI5jsDkv2M0julL84Eg7OVXCKu8ciR7dC+R+KITNBB26","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"fc3ad95e98de7b23892353a578a0b9c7860c8f98","gitHead":"28d3efce08647241aefd00ab5dbdf5e08d1add1b","scripts":{"lint":"jshint *.js","test":"jasmine-node .","test-watch":"jasmine-node . --autotest"},"_npmUser":{"name":"spikeheap","email":"ryanbrooksis@gmail.com"},"repository":{"url":"git+https://github.com/spikeheap/nhs-number-validator.git","type":"git"},"_npmVersion":"2.12.1","description":"Validate NHS numbers in various guises","_nodeVersion":"0.12.7","devDependencies":{"jshint":"^2.8.0","jasmine-core":"^2.3.4","jasmine-node":"^1.14.5","js-combinatorics":"^0.5.0"},"directories":{}},"1.0.1":{"name":"nhs-number-validator","version":"1.0.1","keywords":["nhs","validator","validation"],"author":{"name":"Ryan Brooks","email":"ryan@ryanbrooks.co.uk"},"license":"MIT","_id":"nhs-number-validator@1.0.1","maintainers":[{"name":"spikeheap","email":"ryanbrooksis@gmail.com"}],"homepage":"https://github.com/spikeheap/nhs-number-validator#readme","bugs":{"url":"https://github.com/spikeheap/nhs-number-validator/issues"},"dist":{"shasum":"8ab4081130d7448e073e8d9ace7478e991f96bcb","tarball":"https://registry.npmjs.org/nhs-number-validator/-/nhs-number-validator-1.0.1.tgz","integrity":"sha512-aNL8VXrsrt+uehSR98C6bRF/cTBgJmp3VUd/+NtGQMbLlrOjTK+MYD6krU+JNnuq4PeKgY2DiqSu1qGP0VxTqw==","signatures":[{"sig":"MEYCIQDryGl8lasnnuQvv7I4oA+vV7v+tqLcclHLKM2HlxWTZwIhANUqzGlGcg0asz4pxSnUsnTrsk22vMJec8tXpR8dTQuk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"8ab4081130d7448e073e8d9ace7478e991f96bcb","gitHead":"45f7fede174dd50b77e2cbfcc1b2400bc7b64fbb","scripts":{"lint":"jshint *.js","test":"jasmine-node .","test-watch":"jasmine-node . --autotest"},"_npmUser":{"name":"spikeheap","email":"ryanbrooksis@gmail.com"},"repository":{"url":"git+https://github.com/spikeheap/nhs-number-validator.git","type":"git"},"_npmVersion":"2.12.1","description":"Validate NHS numbers in various guises","_nodeVersion":"0.12.7","devDependencies":{"jshint":"^2.8.0","jasmine-core":"^2.3.4","jasmine-node":"^1.14.5","js-combinatorics":"^0.5.0"},"directories":{}},"1.1.0":{"name":"nhs-number-validator","version":"1.1.0","keywords":["nhs","validator","validation"],"author":{"name":"Ryan Brooks","email":"ryan@ryanbrooks.co.uk"},"license":"MIT","_id":"nhs-number-validator@1.1.0","maintainers":[{"name":"spikeheap","email":"ryanbrooksis@gmail.com"}],"homepage":"https://github.com/spikeheap/nhs-number-validator#readme","bugs":{"url":"https://github.com/spikeheap/nhs-number-validator/issues"},"bin":{"nhs-number-validator":"./cli.js"},"dist":{"shasum":"100adb7fbecb32301038b8969aa1f28984d8caff","tarball":"https://registry.npmjs.org/nhs-number-validator/-/nhs-number-validator-1.1.0.tgz","integrity":"sha512-c5AnSlVYKidHIT0Q4AjtJ3gbkKRcakB5zV2NedoNWj5ySnWXQsWHp19nP1k8mhwjrU3VQF6nUwwl5rdqurX1qw==","signatures":[{"sig":"MEUCIQDYn0b6qlu/b3301Ye8xoRwz49hd/WZRJOrpNgTHOoqNgIgXhQPWblfnlD3GaLC6ZF6dT0yrjchQTxDZZaSrj72ApI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"100adb7fbecb32301038b8969aa1f28984d8caff","gitHead":"ac1577a1d08a0b579d0bd7484328a502f05284de","scripts":{"cli":"./cli.js","lint":"jshint *.js","test":"jasmine-node .","test-watch":"jasmine-node . --autotest"},"_npmUser":{"name":"spikeheap","email":"ryanbrooksis@gmail.com"},"repository":{"url":"git+https://github.com/spikeheap/nhs-number-validator.git","type":"git"},"_npmVersion":"2.12.1","description":"Validate NHS numbers in various guises","_nodeVersion":"0.12.7","devDependencies":{"jshint":"^2.8.0","jasmine-core":"^2.3.4","jasmine-node":"^1.14.5","js-combinatorics":"^0.5.0"},"directories":{}},"1.1.1":{"name":"nhs-number-validator","version":"1.1.1","keywords":["nhs","validator","validation"],"author":{"name":"Ryan Brooks","email":"ryan@ryanbrooks.co.uk"},"license":"MIT","_id":"nhs-number-validator@1.1.1","maintainers":[{"name":"spikeheap","email":"ryanbrooksis@gmail.com"}],"homepage":"https://github.com/spikeheap/nhs-number-validator#readme","bugs":{"url":"https://github.com/spikeheap/nhs-number-validator/issues"},"bin":{"nhs-number-validator":"./cli.js"},"dist":{"shasum":"97592ad7d8a8ab66df1597cd953f33ad4fdacf41","tarball":"https://registry.npmjs.org/nhs-number-validator/-/nhs-number-validator-1.1.1.tgz","integrity":"sha512-2BRg+HkKSg9HwuMxJjKIjex7bCge5wV1hnKRExPNjqjULHgIifWUd6yEnNjS8CjsZZMOA1o0izMIxGNGduHidA==","signatures":[{"sig":"MEYCIQC18qs4+eK/KGmCiq7Qq+J0zPGRHVmZiyovCZAwFiLQzwIhAK/sCLX3de9ogGu0WqG7dIJY/wkt2R7eefTiRMBPNzl/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"97592ad7d8a8ab66df1597cd953f33ad4fdacf41","gitHead":"d752ba565dddd98c9bb821e24c031495118e2264","scripts":{"cli":"./cli.js","lint":"jshint *.js","test":"jasmine-node .","test-watch":"jasmine-node . --autotest"},"_npmUser":{"name":"spikeheap","email":"ryanbrooksis@gmail.com"},"repository":{"url":"git+https://github.com/spikeheap/nhs-number-validator.git","type":"git"},"_npmVersion":"3.3.12","description":"Validate NHS numbers in various guises","_nodeVersion":"5.1.1","devDependencies":{"jshint":"^2.8.0","jasmine-core":"^2.3.4","jasmine-node":"^1.14.5","js-combinatorics":"^0.5.0"},"directories":{}},"1.1.2":{"name":"nhs-number-validator","version":"1.1.2","description":"Validate NHS numbers in various guises","main":"index.js","scripts":{"test":"jasmine-node .","test-watch":"jasmine-node . --autotest","lint":"jshint *.js","cli":"./cli.js"},"bin":{"nhs-number-validator":"cli.js"},"repository":{"type":"git","url":"git+https://github.com/spikeheap/nhs-number-validator.git"},"keywords":["nhs","validator","validation"],"author":{"name":"Ryan Brooks","email":"ryan@ryanbrooks.co.uk"},"license":"MIT","bugs":{"url":"https://github.com/spikeheap/nhs-number-validator/issues"},"homepage":"https://github.com/spikeheap/nhs-number-validator#readme","devDependencies":{"jasmine-core":"^5.8.0","jasmine-node":"^1.16.0","js-combinatorics":"^2.1.2","jshint":"^2.13.6"},"_id":"nhs-number-validator@1.1.2","gitHead":"ab37bb9a6b0b42f0a81f1790d5df20f5a05874f4","_nodeVersion":"20.19.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-95lKgR16wVALyl19k6X3H5qbW8VAzTCNjSUsXVKiYJUMsgBb1OEa+QU3FbgHRfa5N/T/sTmLExt//yh+xCyZtw==","shasum":"9c38ed953c3265e3c2c99f9550cb50f67bef5d28","tarball":"https://registry.npmjs.org/nhs-number-validator/-/nhs-number-validator-1.1.2.tgz","fileCount":10,"unpackedSize":20909,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC2I4iVw24iTjnFuGWHAmgg9/jQ+i7cgpi+6COKmEP2dwIhAIvQ0eYmtGs6mmyPKdLTfsglw4it8gbTayo6BNirHbNA"}]},"_npmUser":{"name":"spikeheap","email":"ryanbrooksis@gmail.com"},"directories":{},"maintainers":[{"name":"spikeheap","email":"ryanbrooksis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nhs-number-validator_1.1.2_1749800810983_0.8791490527940642"},"_hasShrinkwrap":false}},"time":{"created":"2015-09-08T09:01:18.484Z","modified":"2025-06-13T07:46:51.340Z","1.0.0":"2015-09-08T09:01:18.484Z","1.0.1":"2015-09-08T09:18:11.586Z","1.1.0":"2015-09-08T13:15:40.945Z","1.1.1":"2016-01-05T17:13:52.312Z","1.1.2":"2025-06-13T07:46:51.161Z"},"bugs":{"url":"https://github.com/spikeheap/nhs-number-validator/issues"},"author":{"name":"Ryan Brooks","email":"ryan@ryanbrooks.co.uk"},"license":"MIT","homepage":"https://github.com/spikeheap/nhs-number-validator#readme","keywords":["nhs","validator","validation"],"repository":{"type":"git","url":"git+https://github.com/spikeheap/nhs-number-validator.git"},"description":"Validate NHS numbers in various guises","maintainers":[{"name":"spikeheap","email":"ryanbrooksis@gmail.com"}],"readme":"# NHS number validator (JS)\n[![Build Status](https://travis-ci.org/spikeheap/nhs-number-validator.svg?branch=develop)](https://travis-ci.org/spikeheap/nhs-number-validator)\n\nA simple NHS number validator, following the process described in the [NHS Data Dictionary](http://www.datadictionary.nhs.uk/data_dictionary/attributes/n/nhs/nhs_number_de.asp?shownav=0?query=%22nhs+number%22&rank=100&shownav=1).\n\n## Installation\n\n##### NPM\n\n```bash\nnpm install --save nhs-number-validator\n```\n\n##### Bower\n\n```bash\nbower install --save nhs-number-validator\n```\n\n## Usage\n\n##### Command line / terminal\n\nTo run the interactive validation tool, install the NPM module globally:\n\n```bash\nnpm install -g nhs-number-validator\n```\n\nand `nhs-number-validator` will be added to your path:\n\n```bash\n$ nhs-number-validator\nEnter NHS numbers to validate, Ctrl-D to exit\n> 123\n*INVALID\n> 2983396339\n VALID\n```\n\nYou can also install the tool for a single project, and just reference the executable in your project:\n\n```bash\nnpm install nhs-number-validator\n./node_modules/.bin/nhs-number-validator\n# or\n`npm bin`/nhs-number-validator\n```\n\n##### Node/Browserify\n\nFor environments supporting `require`/`exports`:\n\n```javascript\nvar validator = require('nhs-number-validator');\n\nvalidator.validate('2983396339') // => true\nvalidator.validate('test') // => false\n```\n\n##### Browsers\n\nAny environment which exposes `window` will have the `nhsNumberValidator` variable attached when `index.js` is loaded, e.g.:\n\n```html\n<script src=\"./bower_components/nhs-number-validator/index.js\"></script>\n<script>\n  var validator = window.nhsNumberValidator\n  validator.validate('2983396339') // => true\n  validator.validate('test') // => false\n\n  // or just use it directly if you prefer:\n  window.nhsNumberValidator.validate('2983396339') // => true\n\n  // you don't even need `window`:\n  nhsNumberValidator.validate('2983396339') // => true\n</script>\n```\n\n\n## Contributing\n\nPull requests, issues, and questions are all welcome.\n\nSome useful commands:\n\n* `npm test`: run the test suite.\n* `npm run test-watch --silent`: watch for changes and run the test suite each time.\n* `npm run lint --silent`: run the code linter.\n* `npm run cli`: run the validator CLI.\n\nNPM is overly verbose [at the moment](https://github.com/npm/npm/issues/5452), hence the additional `--silent` to suppress the unnecessary noise.\n\n### Creating a release\n\nMaking a release is pretty straightforward:\n\n1. Update the version in `package.json` in the `main` branch.\n2. Tag the commit with the same version number (e.g. `git tag -l \"1.1.1\" && git push --tags`), which will trigger GitHub Actions to publish to NPM.\n\n","readmeFilename":"README.md"}