Phone
Module to generate phone-related data.
Overview
For a phone number, use number()
. Many locales provide country-specific formats.
imei
Generates IMEI number.
Available since v6.2.0
Returns: string
ts
faker.phone.imei(): string
faker.phone.imei() // '13-850175-913761-7'
Source
number
Generates a random phone number.
Available since v7.3.0
Parameters
Name | Type | Default | Description |
---|---|---|---|
format? | string | Format of the phone number. Defaults to a random phone number format. |
Returns: string
ts
faker.phone.number(format?: string): string
faker.phone.number() // '961-770-7727'