mathiasbynens / mathiasbynens/jsesc
support Date objects
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 800
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by locating jsesc’s handling of object values, then compare the proposed valueOf and ISO 8601 representations for Date objects. Done means Date inputs produce supported constructor output with a clearly chosen date representation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100