Konnektr Logo

string

Casts the input to a string.

string

Casts the input to a string.

Type: transform

Aliases

toString, string

Parameters

  • input (unknown): The input can be any type.
  • prettify (boolean): If true, the output will be pretty-printed.

Returns

Type: string

The input converted to a JSON string representation.

Examples

string(123) // "123"
123|string // "123"

On this page