JSON.stringify
with optional function-style replacer
#58
Labels
JSON.stringify
with optional function-style replacer
#58
In our project, we have a code place that wants to call
JSON.stringify
with an optional replacer function contained in a variable. This causes a type error now. Optional replacer still works with array type though.I think the "replacer" arg should be made optional in all three signatures. Calling the function explicitly with
undefined
(as inJSON.stringify({}, undefined, 2)
) will still pick the first match.The text was updated successfully, but these errors were encountered: