dayjs
dayjs copied to clipboard
feat(plugin:duration): Add duration.asObject() method
Hi maintainers,
This PR adds the new duration.asObject() method, as requested in issue #2971.
Closes: #2971
Summary Adds the asObject() method to the Duration class in src/plugin/duration/index.js.
Updates types/plugin/duration.d.ts with a new DurationAsObject interface and the asObject() method.
Adds a new test suite to test/plugin/duration.test.js to validate the new method.
This change passes all npm run lint and npm test checks and maintains 100% test coverage.
Happy to make any adjustments!