From 37e1dad0fe94fa2d8282c033c193f9d5a6a12624 Mon Sep 17 00:00:00 2001 From: Brian J Date: Wed, 18 Dec 2024 08:20:06 -0800 Subject: [PATCH] Update docs for clearer reference to npm --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 06adb88..5eabe41 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ Utility for extracting and validating phone numbers. Extracts an array of phone numbers from an inputted string, validates that these numbers appear genuine and provide data about those phone numbers. -[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat) ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat) ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat) +[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![Install from NPM](https://img.shields.io/badge/npm-@yext/phonenumber--util-blue)](https://www.npmjs.com/package/@yext/phonenumber-util) +![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat) +![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat) +![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) +![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat) ### Scripts @@ -38,6 +43,12 @@ npx vitest run --coverage The returned object will include a `rawNumber` value. This value is the return of the exact value passed to the function. No sanitization occurs with this value. If you reference this number, ensure you sanitize it _BEFORE_ passing to this function. +### Install + +```bash +npm i @yext/phonenumber-util --save +``` + ### Usage There is additional functionality exposed as `export`, but the primary expected use case is: