๐ Phone Number Transformer โ
The Phone Number transformer is used to generate either regular phone numbers or cell phone numbers.
๐ Alternation โ
This transformer does not mutate the existing row value โ it generates a new value.
โ Valid Data Types โ
String
โ๏ธ Options โ
| Option | Type | Description | Default |
|---|---|---|---|
cell-phone | Boolean | Whether to generate a cell phone number instead of a regular phone number. | false (not set) |
format | String | Specify a custom phone number format using # as a digit placeholder (e.g., 073#######). | None |
๐งช Examples โ
Example 1: Default behavior โ
toml
[[table.columns]]
name = "column-example"
transformer = "phone-number"Output: "187-398-0023"Example 2: Specifying cell-phone โ
toml
[[table.columns]]
name = "column-example"
transformer = { "phone-number" = "cell-phone" }Output: "(583) 479-0570"Example 3: Specifying format โ
toml
[[table.columns]]
name = "column-example"
transformer = { "phone-number" = { format = "073#######" } }Output: "0730676396"๐ช Alias Support โ
Instead of specifying transformer = "phone-number", you can also use the following alias to generate a cell phone number:
toml
[[table.columns]]
name = "column-example"
transformer = "cell-phone"