# @types/nanp

> TypeScript definitions for nanp

Latest version **0.3.6** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/nanp
pnpm add @types/nanp
yarn add @types/nanp
bun add @types/nanp
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.6 |
| Published | 2023-11-07 |
| First published | 2016-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/nanp
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nanp
- npm.io page: https://npm.io/package/@types/nanp

## Recent versions

- 0.3.6 (latest) — 2023-11-07
- 0.3.3 (ts2.0) — 2017-08-21
- 0.3.5 — 2023-10-18
- 0.3.4 — 2023-09-23
- 0.3.2 — 2016-10-05
- 0.3.1 — 2016-09-19

## README

# Installation
> `npm install --save @types/nanp`

# Summary
This package contains type definitions for nanp (https://github.com/weisjohn/nanp).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nanp.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nanp/index.d.ts)
````ts
interface Nanp {
    /**
     * Test if a string is a North American Number Plan (phone) number.
     *
     * @param {string} phoneNumber The phone number being tested.
     * @returns {boolean} True if the given phoneNumber is a NANP number.
     */
    (string: string): boolean;

    /**
     * Removes all parenthesis, dashes, dots, spaces.
     * Removes leading `1` or `+1` only on strings longer than 10 digits
     *
     * @param {string} phoneNumber The phone number that is being stripped.
     * @returns {string}
     */
    strip(phoneNumber: string): string;
}

declare var nanp: Nanp;

declare module "nanp" {
    export = nanp;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Karn Saheb](https://github.com/karn).

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