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,4 +1,7 @@
export function buildFormatLongFn(args) {
"use strict";
exports.buildFormatLongFn = buildFormatLongFn;
function buildFormatLongFn(args) {
return (options = {}) => {
// TODO: Remove String()
const width = options.width ? String(options.width) : args.defaultWidth;

View File

@@ -1,7 +1,4 @@
"use strict";
exports.buildFormatLongFn = buildFormatLongFn;
function buildFormatLongFn(args) {
export function buildFormatLongFn(args) {
return (options = {}) => {
// TODO: Remove String()
const width = options.width ? String(options.width) : args.defaultWidth;

View File

@@ -1,4 +1,5 @@
/* eslint-disable no-unused-vars */
"use strict";
exports.buildLocalizeFn = buildLocalizeFn;
/**
* The localize function argument callback which allows to convert raw value to
@@ -39,7 +40,7 @@
* The tuple of localized month values. The first element represents January.
*/
export function buildLocalizeFn(args) {
function buildLocalizeFn(args) {
return (value, options) => {
const context = options?.context ? String(options.context) : "standalone";

View File

@@ -1,6 +1,3 @@
"use strict";
exports.buildLocalizeFn = buildLocalizeFn; /* eslint-disable no-unused-vars */
/**
* The localize function argument callback which allows to convert raw value to
* the actual type.
@@ -40,7 +37,7 @@ exports.buildLocalizeFn = buildLocalizeFn; /* eslint-disable no-unused-vars */
* The tuple of localized month values. The first element represents January.
*/
function buildLocalizeFn(args) {
export function buildLocalizeFn(args) {
return (value, options) => {
const context = options?.context ? String(options.context) : "standalone";

View File

@@ -1,4 +1,7 @@
export function buildMatchFn(args) {
"use strict";
exports.buildMatchFn = buildMatchFn;
function buildMatchFn(args) {
return (string, options = {}) => {
const width = options.width;
@@ -18,14 +21,14 @@ export function buildMatchFn(args) {
const key = Array.isArray(parsePatterns)
? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
: // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
: // [TODO] -- I challenge you to fix the type
findKey(parsePatterns, (pattern) => pattern.test(matchedString));
let value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback
? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
? // [TODO] -- I challenge you to fix the type
options.valueCallback(value)
: value;

View File

@@ -1,7 +1,4 @@
"use strict";
exports.buildMatchFn = buildMatchFn;
function buildMatchFn(args) {
export function buildMatchFn(args) {
return (string, options = {}) => {
const width = options.width;
@@ -21,14 +18,14 @@ function buildMatchFn(args) {
const key = Array.isArray(parsePatterns)
? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
: // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
: // [TODO] -- I challenge you to fix the type
findKey(parsePatterns, (pattern) => pattern.test(matchedString));
let value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback
? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
? // [TODO] -- I challenge you to fix the type
options.valueCallback(value)
: value;

View File

@@ -1,4 +1,7 @@
export function buildMatchPatternFn(args) {
"use strict";
exports.buildMatchPatternFn = buildMatchPatternFn;
function buildMatchPatternFn(args) {
return (string, options = {}) => {
const matchResult = string.match(args.matchPattern);
if (!matchResult) return null;
@@ -10,7 +13,7 @@ export function buildMatchPatternFn(args) {
? args.valueCallback(parseResult[0])
: parseResult[0];
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
// [TODO] I challenge you to fix the type
value = options.valueCallback ? options.valueCallback(value) : value;
const rest = string.slice(matchedString.length);

View File

@@ -1,7 +1,4 @@
"use strict";
exports.buildMatchPatternFn = buildMatchPatternFn;
function buildMatchPatternFn(args) {
export function buildMatchPatternFn(args) {
return (string, options = {}) => {
const matchResult = string.match(args.matchPattern);
if (!matchResult) return null;
@@ -13,7 +10,7 @@ function buildMatchPatternFn(args) {
? args.valueCallback(parseResult[0])
: parseResult[0];
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
// [TODO] I challenge you to fix the type
value = options.valueCallback ? options.valueCallback(value) : value;
const rest = string.slice(matchedString.length);