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