# phn-validator

> Provides checksum validation for British Columbia Provicinal Health Numbers (PHN)

Latest version **1.0.6** (published 2022-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install phn-validator
pnpm add phn-validator
yarn add phn-validator
bun add phn-validator
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2022-05-24 |
| First published | 2021-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | FreshWorks Studio |
| Maintainers | arranfw |
| Keywords | phn, validator, bc, personal, health, number |

## Links

- npm: https://www.npmjs.com/package/phn-validator
- Repository: https://github.com/FreshworksStudio/phn-validator
- Homepage: https://github.com/FreshworksStudio/phn-validator#readme
- Issues: https://github.com/FreshworksStudio/phn-validator/issues
- npm.io page: https://npm.io/package/phn-validator

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2022-05-24
- 1.0.5 — 2021-07-16
- 1.0.4 — 2021-07-16
- 1.0.3 — 2021-07-16
- 1.0.2 — 2021-07-16
- 1.0.1 — 2021-07-16
- 1.0.0 — 2021-07-16

## README

# PHN Validator

This package provides a simple validator for British Columbia provincial health numbers.
The validation follows the process on page 23 of
[this document](https://www2.gov.bc.ca/assets/gov/health/practitioner-pro/software-development-guidelines/vol-4b-application-rules-client-registry.pdf)

## Installation

Install my-project with npm

```bash
  npm i phn-validator
```

Or yarn

```bash
  yarn add phn-validator
```

## Usage/Examples

```typescript
import { phnValidator } from 'phn-validator';

phnValidator("123"); // false
phnValidator("0123456789"); // false
phnValidator("apple"); // Error: Input value must be a numeric string
phnValidator(1001); // Error: Input value must be a string
phnValidator("9260784079"); // true
```

---
_Source: https://npm.io/package/phn-validator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
