Currently, jsesc produces unsupported code when passed a Date object:
jsesc({ value: new Date() })
// => '{\'value\':Tue Mar 31 2020 18:06:06 GMT-0700 (Pacific Daylight Time)}'
Ideally, this would produce a constructor for that date/time. I'm happy to implement - I'm thinking it'd just use the valueOf unless there's a good argument for using the ISO 8601 format.
Currently,
jsesc
produces unsupported code when passed aDate
object:Ideally, this would produce a constructor for that date/time. I'm happy to implement - I'm thinking it'd just use the
valueOf
unless there's a good argument for using the ISO 8601 format.