Skip to content

stringify
@localizer/format 1.1.1

Converts any value into a locale-independent Localizable using string coercion. Suitable for simple string representations.

WARNING

Only use stringify for simple string representations. For other data types, use specialized formatters.

Usage

typescript
import { 
stringify
} from '@localizer/format';
const
result
=
stringify
({});

Demo

Input valueLocalized value
"Hello, world!"Hello, world!
undefinedundefined
nullnull
truetrue
4242
Math.PI3.141592653589793
InfinityInfinity
-Infinity-Infinity
NaNNaN
[1, 2, 3]1,2,3
{ a: 1, b: 2 }[object Object]
/abc//abc/
function() {}function() { }
new Date(2025, 5, 1)Sun Jun 01 2025 00:00:00 GMT+0000 (Coordinated Universal Time)

See also