UNPKG

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