fix: do not modify dayjs input arguments
I noticed that when passing in an array of date formats:
"If you don't know the exact format of an input string, but know it could be one of many, you can use an array of formats." (from https://day.js.org/docs/en/parse/string-format) it was actually modifying the input array. This seems pretty bad.
I'm not sure if your build supports the ... syntax. It could be changed to Object.assign or similar if you want.
Codecov Report
Merging #1529 (2f790ae) into dev (c5688f3) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## dev #1529 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 176 176
Lines 1980 1982 +2
Branches 502 503 +1
=========================================
+ Hits 1980 1982 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/index.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update c5688f3...2f790ae. Read the comment docs.
this is a nice catch, however, ... syntax will result in a large increase of the bundle size, maybe we should looking for some other way to fix this.