Open oscarotero opened 2 months ago
Maybe we can add support of replacer
option in stringify
like the same name option of JSON.stringify
Maybe we can add support of
replacer
option instringify
like the same name option ofJSON.stringify
A replacer
option is almost always a good idea, in my eyes. It allows users to cater to pretty much any of their use cases while keeping the API simple.
Is your feature request related to a problem? Please describe.
I want to create a front matter with a code like this:
But YAML export the
date
value in this way:The only way I found to save only the date (without time) was to convert the value to a string:
But then this value is not parsed as Date.
Describe the solution you'd like
A way to store dates without including the time. As an idea, maybe detecting if the object is a
Temporal.PlainDate
instance.