Converts an entity of any type (string
, number
, boolean
, null
, undefined
, Array
, Object
or Function
) to a string.
Until now, there isn't a built-in or community template that does such thing for Array
and Object
.
Simply provide a reference to any variable you want to convert to a string. This template can handle the following data types:
string
number
boolean
null
undefined
Array
Object
Function
- Arrays: You can choose to stringify arrays using
Array.join()
instead of the defaultJSON.stringify()
. - Null and Undefined: By default,
null
andundefined
are converted to their string equivalents ("null" and "undefined"). You can configure the template to return them as their original types. - Functions: Providing a
Function
will result inundefined
.