A value as slot text, the same in all engines (see the Engine Contract): strings as-is, true/false, numbers via String() (integral floats have no .0), null/undefined as nothing, plain objects and arrays as compact JSON, anything else via String().
true
false
String()
.0
null
undefined
The value to convert.
The text, or undefined for null / undefined.
stringify(3.0); // '3'stringify(true); // 'true'stringify({ a: 1 }); // '{"a":1}'stringify(null); // undefined Copy
stringify(3.0); // '3'stringify(true); // 'true'stringify({ a: 1 }); // '{"a":1}'stringify(null); // undefined
A value as slot text, the same in all engines (see the Engine Contract): strings as-is,
true/false, numbers viaString()(integral floats have no.0),null/undefinedas nothing, plain objects and arrays as compact JSON, anything else viaString().