registration
This commit is contained in:
@@ -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;
|
||||
5
frontend/style/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
generated
vendored
5
frontend/style/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
generated
vendored
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
5
frontend/style/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
generated
vendored
5
frontend/style/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
generated
vendored
@@ -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";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
9
frontend/style/node_modules/date-fns/locale/_lib/buildMatchFn.js
generated
vendored
9
frontend/style/node_modules/date-fns/locale/_lib/buildMatchFn.js
generated
vendored
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
7
frontend/style/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
generated
vendored
7
frontend/style/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
generated
vendored
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user