Skip to main content
Version: v0.0.5

Function: phone()

phone(rng): string

A synthetic phone in the NANP reserved fictional block - (AAA) 555-01NN. The reserved guarantee is the 555-01NN tail (exchange 555, line 0100–0199); the area code is any NANP-valid NXX. Can never be a working number.

Parameters

rng

Rng

The seeded generator.

Returns

string

A formatted synthetic phone string.

Example

import { createRng, phone } from "@cosyte/synth";
phone(createRng(1)); // e.g. "(2XX) 555-01NN"