registration
This commit is contained in:
23
frontend/style/node_modules/date-fns/setDefaultOptions.js
generated
vendored
23
frontend/style/node_modules/date-fns/setDefaultOptions.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
exports.setDefaultOptions = setDefaultOptions;
|
||||
|
||||
var _index = require("./_lib/defaultOptions.js");
|
||||
import {
|
||||
getDefaultOptions,
|
||||
setDefaultOptions as setInternalDefaultOptions,
|
||||
} from "./_lib/defaultOptions.js";
|
||||
|
||||
/**
|
||||
* @name setDefaultOptions
|
||||
@@ -48,13 +48,13 @@ var _index = require("./_lib/defaultOptions.js");
|
||||
* const result = startOfWeek(new Date(2014, 8, 2))
|
||||
* //=> Sun Aug 31 2014 00:00:00
|
||||
*/
|
||||
function setDefaultOptions(options) {
|
||||
export function setDefaultOptions(options) {
|
||||
const result = {};
|
||||
const defaultOptions = (0, _index.getDefaultOptions)();
|
||||
const defaultOptions = getDefaultOptions();
|
||||
|
||||
for (const property in defaultOptions) {
|
||||
if (Object.prototype.hasOwnProperty.call(defaultOptions, property)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
||||
// [TODO] I challenge you to fix the type
|
||||
result[property] = defaultOptions[property];
|
||||
}
|
||||
}
|
||||
@@ -62,14 +62,17 @@ function setDefaultOptions(options) {
|
||||
for (const property in options) {
|
||||
if (Object.prototype.hasOwnProperty.call(options, property)) {
|
||||
if (options[property] === undefined) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
||||
// [TODO] I challenge you to fix the type
|
||||
delete result[property];
|
||||
} else {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
||||
// [TODO] I challenge you to fix the type
|
||||
result[property] = options[property];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(0, _index.setDefaultOptions)(result);
|
||||
setInternalDefaultOptions(result);
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default setDefaultOptions;
|
||||
|
||||
Reference in New Issue
Block a user