Skip to content

Phone Number

The phone number transformer is used to generate either regular phone-numbers of cell-phone numbers.

Alternation

This transformer will not mutate existing row value, it will generate a new value.

Valid Data Types
  • String

Default

Without specifying any options the phone number transformer will generate a phone-number or a cell-phone number depending on which transformer name is used.

Options

cell-phone

Optional field for when transformer should generate a cell-phone number.

format

Optinal field for when you want to generate a phone number with specific formatting. By using the # symbol it’s possible to specify the length and formatting of the number. See beneath for examples.

Default value: No default value.

Examples

Default
skifta.toml
[[table.columns]]
name = "column-example"
transformer = "phone-number"

Result: 187-398-0023


Specifying cell-phone
skifta.toml
[[table.columns]]
name = "column-example"
transformer = { phone-number = "cell-phone" }

Result: (583) 479-0570


Specifying format
skifta.toml
[[table.columns]]
name = "column-example"
transformer = { phone-number = { format = "073#######" } }

Result: 0730676396


Alias

Other they specifying transformer = "phone-number" it’s also possible to specify

skifta.toml
[[table.columns]]
name = "column-example"
transformer = "cell-phone"

or

skifta.toml
[[table.columns]]
name = "column-example"
transformer = "cell-phone-number"

in order to generate a cell-phone number.