getDefaultOptions.cjs 868 B

1234567891011121314151617181920212223242526272829303132
  1. "use strict";
  2. exports.getDefaultOptions = getDefaultOptions;
  3. var _index = require("./_lib/defaultOptions.cjs");
  4. /**
  5. * @name getDefaultOptions
  6. * @category Common Helpers
  7. * @summary Get default options.
  8. * @pure false
  9. *
  10. * @description
  11. * Returns an object that contains defaults for
  12. * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`
  13. * arguments for all functions.
  14. *
  15. * You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions).
  16. *
  17. * @returns The default options
  18. *
  19. * @example
  20. * const result = getDefaultOptions()
  21. * //=> {}
  22. *
  23. * @example
  24. * setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 })
  25. * const result = getDefaultOptions()
  26. * //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }
  27. */
  28. function getDefaultOptions() {
  29. return Object.assign({}, (0, _index.getDefaultOptions)());
  30. }