registration

This commit is contained in:
User
2025-02-02 16:08:03 +03:00
parent 7f6495eb4d
commit 78afbaed71
6334 changed files with 196774 additions and 165754 deletions

View File

@@ -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;