Closed odub closed 4 years ago
Thanks! Going from an object to text and back is a bit awkward. There's a lot baked into that regex and presumably a perf hit.
I'd rather see the main toISOString method become a separate function that takes a { short = false}
argument. Then the existing method can become return toISOString()
and your new method can be return toISOString({short: true})
.
@bendrucker Just fixed those comments. Agreed that that's a nicer API
Thanks for following up. What I had in mind there was using an option internally, but keeping the API the same. Partially for strict semver, partially to match the Date.prototype.toISOString
signature. Went ahead and revised that, will merge and release now.
Looking forward to using this! Cheers!
Published as 2.1.0
Closes #30