Socket
Socket
Sign inDemoInstall

nhs-numbers

Package Overview
Dependencies
2
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

nhs-numbers

Validate NHS numbers in various guises


Version published
Weekly downloads
620
decreased by-32.09%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

NHS numbers

A simple NHS number generator & validator, following the process described in the NHS Data Dictionary.

Based on https://github.com/spikeheap/nhs-number-validator

Installation

yarn add nhs-numbers

Usage


import {
  generateNhsNumber,
  generateInvalidNhsNumbers,
  generateValidNhsNumbers,
  validateNhsNumber
} from "nhs-numbers"

// generate
const nhsNumber = generateNhsNumber()
const validNhsNumbers = generateValidNhsNumbers(10)
const invalidNhsNumbers = generateInvalidNhsNumbers(10)

// validate
const result = validateNhsNumber("1234567880")

Contributing

Setup

yarn

Test

yarn test

Keywords

FAQs

Last updated on 25 Mar 2022

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc