The input object
Optional
replacer: null | StringifyReplacerArray | StringifyReplacerFunctionThe replacer
parameter of JSON.stringify()
Optional
space: null | string | numberThe space
parameter of JSON.stringify()
Optional
options: null | StringifyOptionsThe custom options, refer to StringifyOptions for details
The output string
With the custom options, the output string can be either
JSON.stringify()
)bson.EJSON.stringify()
)lz4js.compress()
) of either of the abovestringify(
{ long_key: "A Large Object" },
(key, val) => {
if (key === "long_key") {
return "A Modified Large Object"
}
return val
},
2,
{
extended: false,
minify: { enable: true, keyMap: { long_key: "lk" } },
compress: false
}
)
Turns the input object into a string.
The input object
Optional
options: null | StringifyOptionsThe custom options, refer to StringifyOptions for details
The output string
With the custom options, the output string can be either
JSON.stringify()
)bson.EJSON.stringify()
)lz4js.compress()
) of either of the abovestringify(
{ long_key: "A Large Object" },
{
extended: false,
minify: { enable: true, keyMap: { long_key: "lk" } },
compress: false
}
)
Generated using TypeDoc
Turns the input object into a string.