Add settings page for managing forecasting API key and URL via UI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-20 14:37:36 +00:00
parent cae411eae7
commit 1c411e402e
19809 changed files with 1962608 additions and 97 deletions

View file

@ -0,0 +1,20 @@
//#region src/string/camelCase.d.ts
/**
* Converts a string to camel case.
*
* Camel case is the naming convention in which the first word is written in lowercase and
* each subsequent word begins with a capital letter, concatenated without any separator characters.
*
* @param str - The string that is to be changed to camel case.
* @returns The converted string to camel case.
*
* @example
* const convertedStr1 = camelCase('camelCase') // returns 'camelCase'
* const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace'
* const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'
* const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'
* const convertedStr5 = camelCase('Keep unicode 😅') // returns 'keepUnicode😅'
*/
declare function camelCase(str: string): string;
//#endregion
export { camelCase };

View file

@ -0,0 +1,20 @@
//#region src/string/camelCase.d.ts
/**
* Converts a string to camel case.
*
* Camel case is the naming convention in which the first word is written in lowercase and
* each subsequent word begins with a capital letter, concatenated without any separator characters.
*
* @param str - The string that is to be changed to camel case.
* @returns The converted string to camel case.
*
* @example
* const convertedStr1 = camelCase('camelCase') // returns 'camelCase'
* const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace'
* const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'
* const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'
* const convertedStr5 = camelCase('Keep unicode 😅') // returns 'keepUnicode😅'
*/
declare function camelCase(str: string): string;
//#endregion
export { camelCase };

View file

@ -0,0 +1,27 @@
const require_capitalize = require("./capitalize.js");
const require_words = require("./words.js");
//#region src/string/camelCase.ts
/**
* Converts a string to camel case.
*
* Camel case is the naming convention in which the first word is written in lowercase and
* each subsequent word begins with a capital letter, concatenated without any separator characters.
*
* @param str - The string that is to be changed to camel case.
* @returns The converted string to camel case.
*
* @example
* const convertedStr1 = camelCase('camelCase') // returns 'camelCase'
* const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace'
* const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'
* const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'
* const convertedStr5 = camelCase('Keep unicode 😅') // returns 'keepUnicode😅'
*/
function camelCase(str) {
const words$1 = require_words.words(str);
if (words$1.length === 0) return "";
const [first, ...rest] = words$1;
return `${first.toLowerCase()}${rest.map((word) => require_capitalize.capitalize(word)).join("")}`;
}
//#endregion
exports.camelCase = camelCase;

View file

@ -0,0 +1,27 @@
import { capitalize } from "./capitalize.mjs";
import { words } from "./words.mjs";
//#region src/string/camelCase.ts
/**
* Converts a string to camel case.
*
* Camel case is the naming convention in which the first word is written in lowercase and
* each subsequent word begins with a capital letter, concatenated without any separator characters.
*
* @param str - The string that is to be changed to camel case.
* @returns The converted string to camel case.
*
* @example
* const convertedStr1 = camelCase('camelCase') // returns 'camelCase'
* const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace'
* const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'
* const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'
* const convertedStr5 = camelCase('Keep unicode 😅') // returns 'keepUnicode😅'
*/
function camelCase(str) {
const words$1 = words(str);
if (words$1.length === 0) return "";
const [first, ...rest] = words$1;
return `${first.toLowerCase()}${rest.map((word) => capitalize(word)).join("")}`;
}
//#endregion
export { camelCase };

View file

@ -0,0 +1,16 @@
//#region src/string/capitalize.d.ts
/**
* Converts the first character of string to upper case and the remaining to lower case.
*
* @template T - Literal type of the string.
* @param str - The string to be converted to uppercase.
* @returns The capitalized string.
*
* @example
* const result = capitalize('fred') // returns 'Fred'
* const result2 = capitalize('FRED') // returns 'Fred'
*/
declare function capitalize<T extends string>(str: T): Capitalize<T>;
type Capitalize<T extends string> = T extends `${infer F}${infer R}` ? `${Uppercase<F>}${Lowercase<R>}` : T;
//#endregion
export { capitalize };

View file

@ -0,0 +1,16 @@
//#region src/string/capitalize.d.ts
/**
* Converts the first character of string to upper case and the remaining to lower case.
*
* @template T - Literal type of the string.
* @param str - The string to be converted to uppercase.
* @returns The capitalized string.
*
* @example
* const result = capitalize('fred') // returns 'Fred'
* const result2 = capitalize('FRED') // returns 'Fred'
*/
declare function capitalize<T extends string>(str: T): Capitalize<T>;
type Capitalize<T extends string> = T extends `${infer F}${infer R}` ? `${Uppercase<F>}${Lowercase<R>}` : T;
//#endregion
export { capitalize };

View file

@ -0,0 +1,17 @@
//#region src/string/capitalize.ts
/**
* Converts the first character of string to upper case and the remaining to lower case.
*
* @template T - Literal type of the string.
* @param str - The string to be converted to uppercase.
* @returns The capitalized string.
*
* @example
* const result = capitalize('fred') // returns 'Fred'
* const result2 = capitalize('FRED') // returns 'Fred'
*/
function capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
}
//#endregion
exports.capitalize = capitalize;

View file

@ -0,0 +1,17 @@
//#region src/string/capitalize.ts
/**
* Converts the first character of string to upper case and the remaining to lower case.
*
* @template T - Literal type of the string.
* @param str - The string to be converted to uppercase.
* @returns The capitalized string.
*
* @example
* const result = capitalize('fred') // returns 'Fred'
* const result2 = capitalize('FRED') // returns 'Fred'
*/
function capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
}
//#endregion
export { capitalize };

View file

@ -0,0 +1,18 @@
//#region src/string/constantCase.d.ts
/**
* Converts a string to constant case.
*
* Constant case is a naming convention where each word is written in uppercase letters and separated by an underscore (`_`). For example, `CONSTANT_CASE`.
*
* @param str - The string that is to be changed to constant case.
* @returns The converted string to constant case.
*
* @example
* const convertedStr1 = constantCase('camelCase') // returns 'CAMEL_CASE'
* const convertedStr2 = constantCase('some whitespace') // returns 'SOME_WHITESPACE'
* const convertedStr3 = constantCase('hyphen-text') // returns 'HYPHEN_TEXT'
* const convertedStr4 = constantCase('HTTPRequest') // returns 'HTTP_REQUEST'
*/
declare function constantCase(str: string): string;
//#endregion
export { constantCase };

View file

@ -0,0 +1,18 @@
//#region src/string/constantCase.d.ts
/**
* Converts a string to constant case.
*
* Constant case is a naming convention where each word is written in uppercase letters and separated by an underscore (`_`). For example, `CONSTANT_CASE`.
*
* @param str - The string that is to be changed to constant case.
* @returns The converted string to constant case.
*
* @example
* const convertedStr1 = constantCase('camelCase') // returns 'CAMEL_CASE'
* const convertedStr2 = constantCase('some whitespace') // returns 'SOME_WHITESPACE'
* const convertedStr3 = constantCase('hyphen-text') // returns 'HYPHEN_TEXT'
* const convertedStr4 = constantCase('HTTPRequest') // returns 'HTTP_REQUEST'
*/
declare function constantCase(str: string): string;
//#endregion
export { constantCase };

View file

@ -0,0 +1,21 @@
const require_words = require("./words.js");
//#region src/string/constantCase.ts
/**
* Converts a string to constant case.
*
* Constant case is a naming convention where each word is written in uppercase letters and separated by an underscore (`_`). For example, `CONSTANT_CASE`.
*
* @param str - The string that is to be changed to constant case.
* @returns The converted string to constant case.
*
* @example
* const convertedStr1 = constantCase('camelCase') // returns 'CAMEL_CASE'
* const convertedStr2 = constantCase('some whitespace') // returns 'SOME_WHITESPACE'
* const convertedStr3 = constantCase('hyphen-text') // returns 'HYPHEN_TEXT'
* const convertedStr4 = constantCase('HTTPRequest') // returns 'HTTP_REQUEST'
*/
function constantCase(str) {
return require_words.words(str).map((word) => word.toUpperCase()).join("_");
}
//#endregion
exports.constantCase = constantCase;

View file

@ -0,0 +1,21 @@
import { words } from "./words.mjs";
//#region src/string/constantCase.ts
/**
* Converts a string to constant case.
*
* Constant case is a naming convention where each word is written in uppercase letters and separated by an underscore (`_`). For example, `CONSTANT_CASE`.
*
* @param str - The string that is to be changed to constant case.
* @returns The converted string to constant case.
*
* @example
* const convertedStr1 = constantCase('camelCase') // returns 'CAMEL_CASE'
* const convertedStr2 = constantCase('some whitespace') // returns 'SOME_WHITESPACE'
* const convertedStr3 = constantCase('hyphen-text') // returns 'HYPHEN_TEXT'
* const convertedStr4 = constantCase('HTTPRequest') // returns 'HTTP_REQUEST'
*/
function constantCase(str) {
return words(str).map((word) => word.toUpperCase()).join("_");
}
//#endregion
export { constantCase };

View file

@ -0,0 +1,23 @@
//#region src/string/deburr.d.ts
/**
* Converts a string by replacing special characters and diacritical marks with their ASCII equivalents.
* For example, "Crème brûlée" becomes "Creme brulee".
*
* @param str - The input string to be deburred.
* @returns The deburred string with special characters replaced by their ASCII equivalents.
*
* @example
* // Basic usage:
* deburr('Æthelred') // returns 'Aethelred'
*
* @example
* // Handling diacritical marks:
* deburr('München') // returns 'Munchen'
*
* @example
* // Special characters:
* deburr('Crème brûlée') // returns 'Creme brulee'
*/
declare function deburr(str: string): string;
//#endregion
export { deburr };

View file

@ -0,0 +1,23 @@
//#region src/string/deburr.d.ts
/**
* Converts a string by replacing special characters and diacritical marks with their ASCII equivalents.
* For example, "Crème brûlée" becomes "Creme brulee".
*
* @param str - The input string to be deburred.
* @returns The deburred string with special characters replaced by their ASCII equivalents.
*
* @example
* // Basic usage:
* deburr('Æthelred') // returns 'Aethelred'
*
* @example
* // Handling diacritical marks:
* deburr('München') // returns 'Munchen'
*
* @example
* // Special characters:
* deburr('Crème brûlée') // returns 'Creme brulee'
*/
declare function deburr(str: string): string;
//#endregion
export { deburr };

63
frontend/node_modules/es-toolkit/dist/string/deburr.js generated vendored Normal file
View file

@ -0,0 +1,63 @@
//#region src/string/deburr.ts
const deburrMap = new Map([
["Æ", "Ae"],
["Ð", "D"],
["Ø", "O"],
["Þ", "Th"],
["ß", "ss"],
["æ", "ae"],
["ð", "d"],
["ø", "o"],
["þ", "th"],
["Đ", "D"],
["đ", "d"],
["Ħ", "H"],
["ħ", "h"],
["ı", "i"],
["IJ", "IJ"],
["ij", "ij"],
["ĸ", "k"],
["Ŀ", "L"],
["ŀ", "l"],
["Ł", "L"],
["ł", "l"],
["ʼn", "'n"],
["Ŋ", "N"],
["ŋ", "n"],
["Œ", "Oe"],
["œ", "oe"],
["Ŧ", "T"],
["ŧ", "t"],
["ſ", "s"]
]);
/**
* Converts a string by replacing special characters and diacritical marks with their ASCII equivalents.
* For example, "Crème brûlée" becomes "Creme brulee".
*
* @param str - The input string to be deburred.
* @returns The deburred string with special characters replaced by their ASCII equivalents.
*
* @example
* // Basic usage:
* deburr('Æthelred') // returns 'Aethelred'
*
* @example
* // Handling diacritical marks:
* deburr('München') // returns 'Munchen'
*
* @example
* // Special characters:
* deburr('Crème brûlée') // returns 'Creme brulee'
*/
function deburr(str) {
str = str.normalize("NFD");
let result = "";
for (let i = 0; i < str.length; i++) {
const char = str[i];
if (char >= "̀" && char <= "ͯ" || char >= "︠" && char <= "︣") continue;
result += deburrMap.get(char) ?? char;
}
return result;
}
//#endregion
exports.deburr = deburr;

View file

@ -0,0 +1,63 @@
//#region src/string/deburr.ts
const deburrMap = new Map([
["Æ", "Ae"],
["Ð", "D"],
["Ø", "O"],
["Þ", "Th"],
["ß", "ss"],
["æ", "ae"],
["ð", "d"],
["ø", "o"],
["þ", "th"],
["Đ", "D"],
["đ", "d"],
["Ħ", "H"],
["ħ", "h"],
["ı", "i"],
["IJ", "IJ"],
["ij", "ij"],
["ĸ", "k"],
["Ŀ", "L"],
["ŀ", "l"],
["Ł", "L"],
["ł", "l"],
["ʼn", "'n"],
["Ŋ", "N"],
["ŋ", "n"],
["Œ", "Oe"],
["œ", "oe"],
["Ŧ", "T"],
["ŧ", "t"],
["ſ", "s"]
]);
/**
* Converts a string by replacing special characters and diacritical marks with their ASCII equivalents.
* For example, "Crème brûlée" becomes "Creme brulee".
*
* @param str - The input string to be deburred.
* @returns The deburred string with special characters replaced by their ASCII equivalents.
*
* @example
* // Basic usage:
* deburr('Æthelred') // returns 'Aethelred'
*
* @example
* // Handling diacritical marks:
* deburr('München') // returns 'Munchen'
*
* @example
* // Special characters:
* deburr('Crème brûlée') // returns 'Creme brulee'
*/
function deburr(str) {
str = str.normalize("NFD");
let result = "";
for (let i = 0; i < str.length; i++) {
const char = str[i];
if (char >= "̀" && char <= "ͯ" || char >= "︠" && char <= "︣") continue;
result += deburrMap.get(char) ?? char;
}
return result;
}
//#endregion
export { deburr };

View file

@ -0,0 +1,17 @@
//#region src/string/escape.d.ts
/**
* Converts the characters "&", "<", ">", '"', and "'" in `str` to their corresponding HTML entities.
* For example, "<" becomes "&lt;".
*
* @param str The string to escape.
* @returns Returns the escaped string.
*
* @example
* escape('This is a <div> element.'); // returns 'This is a &lt;div&gt; element.'
* escape('This is a "quote"'); // returns 'This is a &quot;quote&quot;'
* escape("This is a 'quote'"); // returns 'This is a &#39;quote&#39;'
* escape('This is a & symbol'); // returns 'This is a &amp; symbol'
*/
declare function escape(str: string): string;
//#endregion
export { escape };

View file

@ -0,0 +1,17 @@
//#region src/string/escape.d.ts
/**
* Converts the characters "&", "<", ">", '"', and "'" in `str` to their corresponding HTML entities.
* For example, "<" becomes "&lt;".
*
* @param str The string to escape.
* @returns Returns the escaped string.
*
* @example
* escape('This is a <div> element.'); // returns 'This is a &lt;div&gt; element.'
* escape('This is a "quote"'); // returns 'This is a &quot;quote&quot;'
* escape("This is a 'quote'"); // returns 'This is a &#39;quote&#39;'
* escape('This is a & symbol'); // returns 'This is a &amp; symbol'
*/
declare function escape(str: string): string;
//#endregion
export { escape };

26
frontend/node_modules/es-toolkit/dist/string/escape.js generated vendored Normal file
View file

@ -0,0 +1,26 @@
//#region src/string/escape.ts
const htmlEscapes = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
"\"": "&quot;",
"'": "&#39;"
};
/**
* Converts the characters "&", "<", ">", '"', and "'" in `str` to their corresponding HTML entities.
* For example, "<" becomes "&lt;".
*
* @param str The string to escape.
* @returns Returns the escaped string.
*
* @example
* escape('This is a <div> element.'); // returns 'This is a &lt;div&gt; element.'
* escape('This is a "quote"'); // returns 'This is a &quot;quote&quot;'
* escape("This is a 'quote'"); // returns 'This is a &#39;quote&#39;'
* escape('This is a & symbol'); // returns 'This is a &amp; symbol'
*/
function escape(str) {
return str.replace(/[&<>"']/g, (match) => htmlEscapes[match]);
}
//#endregion
exports.escape = escape;

View file

@ -0,0 +1,26 @@
//#region src/string/escape.ts
const htmlEscapes = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
"\"": "&quot;",
"'": "&#39;"
};
/**
* Converts the characters "&", "<", ">", '"', and "'" in `str` to their corresponding HTML entities.
* For example, "<" becomes "&lt;".
*
* @param str The string to escape.
* @returns Returns the escaped string.
*
* @example
* escape('This is a <div> element.'); // returns 'This is a &lt;div&gt; element.'
* escape('This is a "quote"'); // returns 'This is a &quot;quote&quot;'
* escape("This is a 'quote'"); // returns 'This is a &#39;quote&#39;'
* escape('This is a & symbol'); // returns 'This is a &amp; symbol'
*/
function escape(str) {
return str.replace(/[&<>"']/g, (match) => htmlEscapes[match]);
}
//#endregion
export { escape };

View file

@ -0,0 +1,15 @@
//#region src/string/escapeRegExp.d.ts
/**
* Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `str`.
*
* @param str The string to escape.
* @returns Returns the escaped string.
*
* @example
* import { escapeRegExp } from 'es-toolkit/string';
*
* escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\[es-toolkit\]\(https://es-toolkit\.dev/\)'
*/
declare function escapeRegExp(str: string): string;
//#endregion
export { escapeRegExp };

View file

@ -0,0 +1,15 @@
//#region src/string/escapeRegExp.d.ts
/**
* Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `str`.
*
* @param str The string to escape.
* @returns Returns the escaped string.
*
* @example
* import { escapeRegExp } from 'es-toolkit/string';
*
* escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\[es-toolkit\]\(https://es-toolkit\.dev/\)'
*/
declare function escapeRegExp(str: string): string;
//#endregion
export { escapeRegExp };

View file

@ -0,0 +1,17 @@
//#region src/string/escapeRegExp.ts
/**
* Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `str`.
*
* @param str The string to escape.
* @returns Returns the escaped string.
*
* @example
* import { escapeRegExp } from 'es-toolkit/string';
*
* escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\[es-toolkit\]\(https://es-toolkit\.dev/\)'
*/
function escapeRegExp(str) {
return str.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
}
//#endregion
exports.escapeRegExp = escapeRegExp;

View file

@ -0,0 +1,17 @@
//#region src/string/escapeRegExp.ts
/**
* Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `str`.
*
* @param str The string to escape.
* @returns Returns the escaped string.
*
* @example
* import { escapeRegExp } from 'es-toolkit/string';
*
* escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\[es-toolkit\]\(https://es-toolkit\.dev/\)'
*/
function escapeRegExp(str) {
return str.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
}
//#endregion
export { escapeRegExp };

View file

@ -0,0 +1,22 @@
import { camelCase } from "./camelCase.mjs";
import { capitalize } from "./capitalize.mjs";
import { constantCase } from "./constantCase.mjs";
import { deburr } from "./deburr.mjs";
import { escape } from "./escape.mjs";
import { escapeRegExp } from "./escapeRegExp.mjs";
import { kebabCase } from "./kebabCase.mjs";
import { lowerCase } from "./lowerCase.mjs";
import { lowerFirst } from "./lowerFirst.mjs";
import { pad } from "./pad.mjs";
import { pascalCase } from "./pascalCase.mjs";
import { reverseString } from "./reverseString.mjs";
import { snakeCase } from "./snakeCase.mjs";
import { startCase } from "./startCase.mjs";
import { trim } from "./trim.mjs";
import { trimEnd } from "./trimEnd.mjs";
import { trimStart } from "./trimStart.mjs";
import { unescape } from "./unescape.mjs";
import { upperCase } from "./upperCase.mjs";
import { upperFirst } from "./upperFirst.mjs";
import { words } from "./words.mjs";
export { camelCase, capitalize, constantCase, deburr, escape, escapeRegExp, kebabCase, lowerCase, lowerFirst, pad, pascalCase, reverseString, snakeCase, startCase, trim, trimEnd, trimStart, unescape, upperCase, upperFirst, words };

View file

@ -0,0 +1,22 @@
import { camelCase } from "./camelCase.js";
import { capitalize } from "./capitalize.js";
import { constantCase } from "./constantCase.js";
import { deburr } from "./deburr.js";
import { escape } from "./escape.js";
import { escapeRegExp } from "./escapeRegExp.js";
import { kebabCase } from "./kebabCase.js";
import { lowerCase } from "./lowerCase.js";
import { lowerFirst } from "./lowerFirst.js";
import { pad } from "./pad.js";
import { pascalCase } from "./pascalCase.js";
import { reverseString } from "./reverseString.js";
import { snakeCase } from "./snakeCase.js";
import { startCase } from "./startCase.js";
import { trim } from "./trim.js";
import { trimEnd } from "./trimEnd.js";
import { trimStart } from "./trimStart.js";
import { unescape } from "./unescape.js";
import { upperCase } from "./upperCase.js";
import { upperFirst } from "./upperFirst.js";
import { words } from "./words.js";
export { camelCase, capitalize, constantCase, deburr, escape, escapeRegExp, kebabCase, lowerCase, lowerFirst, pad, pascalCase, reverseString, snakeCase, startCase, trim, trimEnd, trimStart, unescape, upperCase, upperFirst, words };

43
frontend/node_modules/es-toolkit/dist/string/index.js generated vendored Normal file
View file

@ -0,0 +1,43 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_capitalize = require("./capitalize.js");
const require_words = require("./words.js");
const require_camelCase = require("./camelCase.js");
const require_snakeCase = require("./snakeCase.js");
const require_constantCase = require("./constantCase.js");
const require_deburr = require("./deburr.js");
const require_escape = require("./escape.js");
const require_escapeRegExp = require("./escapeRegExp.js");
const require_kebabCase = require("./kebabCase.js");
const require_lowerCase = require("./lowerCase.js");
const require_lowerFirst = require("./lowerFirst.js");
const require_pad = require("./pad.js");
const require_pascalCase = require("./pascalCase.js");
const require_reverseString = require("./reverseString.js");
const require_startCase = require("./startCase.js");
const require_trimEnd = require("./trimEnd.js");
const require_trimStart = require("./trimStart.js");
const require_trim = require("./trim.js");
const require_unescape = require("./unescape.js");
const require_upperCase = require("./upperCase.js");
const require_upperFirst = require("./upperFirst.js");
exports.camelCase = require_camelCase.camelCase;
exports.capitalize = require_capitalize.capitalize;
exports.constantCase = require_constantCase.constantCase;
exports.deburr = require_deburr.deburr;
exports.escape = require_escape.escape;
exports.escapeRegExp = require_escapeRegExp.escapeRegExp;
exports.kebabCase = require_kebabCase.kebabCase;
exports.lowerCase = require_lowerCase.lowerCase;
exports.lowerFirst = require_lowerFirst.lowerFirst;
exports.pad = require_pad.pad;
exports.pascalCase = require_pascalCase.pascalCase;
exports.reverseString = require_reverseString.reverseString;
exports.snakeCase = require_snakeCase.snakeCase;
exports.startCase = require_startCase.startCase;
exports.trim = require_trim.trim;
exports.trimEnd = require_trimEnd.trimEnd;
exports.trimStart = require_trimStart.trimStart;
exports.unescape = require_unescape.unescape;
exports.upperCase = require_upperCase.upperCase;
exports.upperFirst = require_upperFirst.upperFirst;
exports.words = require_words.words;

22
frontend/node_modules/es-toolkit/dist/string/index.mjs generated vendored Normal file
View file

@ -0,0 +1,22 @@
import { capitalize } from "./capitalize.mjs";
import { words } from "./words.mjs";
import { camelCase } from "./camelCase.mjs";
import { snakeCase } from "./snakeCase.mjs";
import { constantCase } from "./constantCase.mjs";
import { deburr } from "./deburr.mjs";
import { escape } from "./escape.mjs";
import { escapeRegExp } from "./escapeRegExp.mjs";
import { kebabCase } from "./kebabCase.mjs";
import { lowerCase } from "./lowerCase.mjs";
import { lowerFirst } from "./lowerFirst.mjs";
import { pad } from "./pad.mjs";
import { pascalCase } from "./pascalCase.mjs";
import { reverseString } from "./reverseString.mjs";
import { startCase } from "./startCase.mjs";
import { trimEnd } from "./trimEnd.mjs";
import { trimStart } from "./trimStart.mjs";
import { trim } from "./trim.mjs";
import { unescape } from "./unescape.mjs";
import { upperCase } from "./upperCase.mjs";
import { upperFirst } from "./upperFirst.mjs";
export { camelCase, capitalize, constantCase, deburr, escape, escapeRegExp, kebabCase, lowerCase, lowerFirst, pad, pascalCase, reverseString, snakeCase, startCase, trim, trimEnd, trimStart, unescape, upperCase, upperFirst, words };

View file

@ -0,0 +1,18 @@
//#region src/string/kebabCase.d.ts
/**
* Converts a string to kebab case.
*
* Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character.
*
* @param str - The string that is to be changed to kebab case.
* @returns The converted string to kebab case.
*
* @example
* const convertedStr1 = kebabCase('camelCase') // returns 'camel-case'
* const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace'
* const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text'
* const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request'
*/
declare function kebabCase(str: string): string;
//#endregion
export { kebabCase };

View file

@ -0,0 +1,18 @@
//#region src/string/kebabCase.d.ts
/**
* Converts a string to kebab case.
*
* Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character.
*
* @param str - The string that is to be changed to kebab case.
* @returns The converted string to kebab case.
*
* @example
* const convertedStr1 = kebabCase('camelCase') // returns 'camel-case'
* const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace'
* const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text'
* const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request'
*/
declare function kebabCase(str: string): string;
//#endregion
export { kebabCase };

View file

@ -0,0 +1,21 @@
const require_words = require("./words.js");
//#region src/string/kebabCase.ts
/**
* Converts a string to kebab case.
*
* Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character.
*
* @param str - The string that is to be changed to kebab case.
* @returns The converted string to kebab case.
*
* @example
* const convertedStr1 = kebabCase('camelCase') // returns 'camel-case'
* const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace'
* const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text'
* const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request'
*/
function kebabCase(str) {
return require_words.words(str).map((word) => word.toLowerCase()).join("-");
}
//#endregion
exports.kebabCase = kebabCase;

View file

@ -0,0 +1,21 @@
import { words } from "./words.mjs";
//#region src/string/kebabCase.ts
/**
* Converts a string to kebab case.
*
* Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character.
*
* @param str - The string that is to be changed to kebab case.
* @returns The converted string to kebab case.
*
* @example
* const convertedStr1 = kebabCase('camelCase') // returns 'camel-case'
* const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace'
* const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text'
* const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request'
*/
function kebabCase(str) {
return words(str).map((word) => word.toLowerCase()).join("-");
}
//#endregion
export { kebabCase };

View file

@ -0,0 +1,18 @@
//#region src/string/lowerCase.d.ts
/**
* Converts a string to lower case.
*
* Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character.
*
* @param str - The string that is to be changed to lower case.
* @returns The converted string to lower case.
*
* @example
* const convertedStr1 = lowerCase('camelCase') // returns 'camel case'
* const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace'
* const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text'
* const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request'
*/
declare function lowerCase(str: string): string;
//#endregion
export { lowerCase };

View file

@ -0,0 +1,18 @@
//#region src/string/lowerCase.d.ts
/**
* Converts a string to lower case.
*
* Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character.
*
* @param str - The string that is to be changed to lower case.
* @returns The converted string to lower case.
*
* @example
* const convertedStr1 = lowerCase('camelCase') // returns 'camel case'
* const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace'
* const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text'
* const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request'
*/
declare function lowerCase(str: string): string;
//#endregion
export { lowerCase };

View file

@ -0,0 +1,21 @@
const require_words = require("./words.js");
//#region src/string/lowerCase.ts
/**
* Converts a string to lower case.
*
* Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character.
*
* @param str - The string that is to be changed to lower case.
* @returns The converted string to lower case.
*
* @example
* const convertedStr1 = lowerCase('camelCase') // returns 'camel case'
* const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace'
* const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text'
* const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request'
*/
function lowerCase(str) {
return require_words.words(str).map((word) => word.toLowerCase()).join(" ");
}
//#endregion
exports.lowerCase = lowerCase;

View file

@ -0,0 +1,21 @@
import { words } from "./words.mjs";
//#region src/string/lowerCase.ts
/**
* Converts a string to lower case.
*
* Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character.
*
* @param str - The string that is to be changed to lower case.
* @returns The converted string to lower case.
*
* @example
* const convertedStr1 = lowerCase('camelCase') // returns 'camel case'
* const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace'
* const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text'
* const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request'
*/
function lowerCase(str) {
return words(str).map((word) => word.toLowerCase()).join(" ");
}
//#endregion
export { lowerCase };

View file

@ -0,0 +1,15 @@
//#region src/string/lowerFirst.d.ts
/**
* Converts the first character of string to lower case.
*
* @param str - The string that is to be changed
* @returns The converted string.
*
* @example
* const convertedStr1 = lowerCase('fred') // returns 'fred'
* const convertedStr2 = lowerCase('Fred') // returns 'fred'
* const convertedStr3 = lowerCase('FRED') // returns 'fRED'
*/
declare function lowerFirst(str: string): string;
//#endregion
export { lowerFirst };

View file

@ -0,0 +1,15 @@
//#region src/string/lowerFirst.d.ts
/**
* Converts the first character of string to lower case.
*
* @param str - The string that is to be changed
* @returns The converted string.
*
* @example
* const convertedStr1 = lowerCase('fred') // returns 'fred'
* const convertedStr2 = lowerCase('Fred') // returns 'fred'
* const convertedStr3 = lowerCase('FRED') // returns 'fRED'
*/
declare function lowerFirst(str: string): string;
//#endregion
export { lowerFirst };

View file

@ -0,0 +1,17 @@
//#region src/string/lowerFirst.ts
/**
* Converts the first character of string to lower case.
*
* @param str - The string that is to be changed
* @returns The converted string.
*
* @example
* const convertedStr1 = lowerCase('fred') // returns 'fred'
* const convertedStr2 = lowerCase('Fred') // returns 'fred'
* const convertedStr3 = lowerCase('FRED') // returns 'fRED'
*/
function lowerFirst(str) {
return str.substring(0, 1).toLowerCase() + str.substring(1);
}
//#endregion
exports.lowerFirst = lowerFirst;

View file

@ -0,0 +1,17 @@
//#region src/string/lowerFirst.ts
/**
* Converts the first character of string to lower case.
*
* @param str - The string that is to be changed
* @returns The converted string.
*
* @example
* const convertedStr1 = lowerCase('fred') // returns 'fred'
* const convertedStr2 = lowerCase('Fred') // returns 'fred'
* const convertedStr3 = lowerCase('FRED') // returns 'fRED'
*/
function lowerFirst(str) {
return str.substring(0, 1).toLowerCase() + str.substring(1);
}
//#endregion
export { lowerFirst };

20
frontend/node_modules/es-toolkit/dist/string/pad.d.mts generated vendored Normal file
View file

@ -0,0 +1,20 @@
//#region src/string/pad.d.ts
/**
* Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.
* If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.
*
* @param str - The string to pad.
* @param [length] - The length of the resulting string once padded.
* @param [chars] - The character(s) to use for padding.
* @returns The padded string, or the original string if padding is not required.
*
* @example
* const result1 = pad('abc', 8); // result will be ' abc '
* const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_'
* const result3 = pad('abc', 3); // result will be 'abc'
* const result4 = pad('abc', 2); // result will be 'abc'
*
*/
declare function pad(str: string, length: number, chars?: string): string;
//#endregion
export { pad };

20
frontend/node_modules/es-toolkit/dist/string/pad.d.ts generated vendored Normal file
View file

@ -0,0 +1,20 @@
//#region src/string/pad.d.ts
/**
* Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.
* If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.
*
* @param str - The string to pad.
* @param [length] - The length of the resulting string once padded.
* @param [chars] - The character(s) to use for padding.
* @returns The padded string, or the original string if padding is not required.
*
* @example
* const result1 = pad('abc', 8); // result will be ' abc '
* const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_'
* const result3 = pad('abc', 3); // result will be 'abc'
* const result4 = pad('abc', 2); // result will be 'abc'
*
*/
declare function pad(str: string, length: number, chars?: string): string;
//#endregion
export { pad };

22
frontend/node_modules/es-toolkit/dist/string/pad.js generated vendored Normal file
View file

@ -0,0 +1,22 @@
//#region src/string/pad.ts
/**
* Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.
* If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.
*
* @param str - The string to pad.
* @param [length] - The length of the resulting string once padded.
* @param [chars] - The character(s) to use for padding.
* @returns The padded string, or the original string if padding is not required.
*
* @example
* const result1 = pad('abc', 8); // result will be ' abc '
* const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_'
* const result3 = pad('abc', 3); // result will be 'abc'
* const result4 = pad('abc', 2); // result will be 'abc'
*
*/
function pad(str, length, chars = " ") {
return str.padStart(Math.floor((length - str.length) / 2) + str.length, chars).padEnd(length, chars);
}
//#endregion
exports.pad = pad;

22
frontend/node_modules/es-toolkit/dist/string/pad.mjs generated vendored Normal file
View file

@ -0,0 +1,22 @@
//#region src/string/pad.ts
/**
* Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length.
* If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.
*
* @param str - The string to pad.
* @param [length] - The length of the resulting string once padded.
* @param [chars] - The character(s) to use for padding.
* @returns The padded string, or the original string if padding is not required.
*
* @example
* const result1 = pad('abc', 8); // result will be ' abc '
* const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_'
* const result3 = pad('abc', 3); // result will be 'abc'
* const result4 = pad('abc', 2); // result will be 'abc'
*
*/
function pad(str, length, chars = " ") {
return str.padStart(Math.floor((length - str.length) / 2) + str.length, chars).padEnd(length, chars);
}
//#endregion
export { pad };

View file

@ -0,0 +1,18 @@
//#region src/string/pascalCase.d.ts
/**
* Converts a string to Pascal case.
*
* Pascal case is the naming convention in which each word is capitalized and concatenated without any separator characters.
*
* @param str - The string that is to be changed to pascal case.
* @returns The converted string to Pascal case.
*
* @example
* const convertedStr1 = pascalCase('pascalCase') // returns 'PascalCase'
* const convertedStr2 = pascalCase('some whitespace') // returns 'SomeWhitespace'
* const convertedStr3 = pascalCase('hyphen-text') // returns 'HyphenText'
* const convertedStr4 = pascalCase('HTTPRequest') // returns 'HttpRequest'
*/
declare function pascalCase(str: string): string;
//#endregion
export { pascalCase };

View file

@ -0,0 +1,18 @@
//#region src/string/pascalCase.d.ts
/**
* Converts a string to Pascal case.
*
* Pascal case is the naming convention in which each word is capitalized and concatenated without any separator characters.
*
* @param str - The string that is to be changed to pascal case.
* @returns The converted string to Pascal case.
*
* @example
* const convertedStr1 = pascalCase('pascalCase') // returns 'PascalCase'
* const convertedStr2 = pascalCase('some whitespace') // returns 'SomeWhitespace'
* const convertedStr3 = pascalCase('hyphen-text') // returns 'HyphenText'
* const convertedStr4 = pascalCase('HTTPRequest') // returns 'HttpRequest'
*/
declare function pascalCase(str: string): string;
//#endregion
export { pascalCase };

View file

@ -0,0 +1,22 @@
const require_capitalize = require("./capitalize.js");
const require_words = require("./words.js");
//#region src/string/pascalCase.ts
/**
* Converts a string to Pascal case.
*
* Pascal case is the naming convention in which each word is capitalized and concatenated without any separator characters.
*
* @param str - The string that is to be changed to pascal case.
* @returns The converted string to Pascal case.
*
* @example
* const convertedStr1 = pascalCase('pascalCase') // returns 'PascalCase'
* const convertedStr2 = pascalCase('some whitespace') // returns 'SomeWhitespace'
* const convertedStr3 = pascalCase('hyphen-text') // returns 'HyphenText'
* const convertedStr4 = pascalCase('HTTPRequest') // returns 'HttpRequest'
*/
function pascalCase(str) {
return require_words.words(str).map((word) => require_capitalize.capitalize(word)).join("");
}
//#endregion
exports.pascalCase = pascalCase;

View file

@ -0,0 +1,22 @@
import { capitalize } from "./capitalize.mjs";
import { words } from "./words.mjs";
//#region src/string/pascalCase.ts
/**
* Converts a string to Pascal case.
*
* Pascal case is the naming convention in which each word is capitalized and concatenated without any separator characters.
*
* @param str - The string that is to be changed to pascal case.
* @returns The converted string to Pascal case.
*
* @example
* const convertedStr1 = pascalCase('pascalCase') // returns 'PascalCase'
* const convertedStr2 = pascalCase('some whitespace') // returns 'SomeWhitespace'
* const convertedStr3 = pascalCase('hyphen-text') // returns 'HyphenText'
* const convertedStr4 = pascalCase('HTTPRequest') // returns 'HttpRequest'
*/
function pascalCase(str) {
return words(str).map((word) => capitalize(word)).join("");
}
//#endregion
export { pascalCase };

View file

@ -0,0 +1,17 @@
//#region src/string/reverseString.d.ts
/**
* Reverses a given string.
*
* This function takes a string as input and returns a new string that is the reverse of the input.
*
* @param value - The string that is to be reversed.
* @returns The reversed string.
*
* @example
* const reversedStr1 = reverseString('hello') // returns 'olleh'
* const reversedStr2 = reverseString('PascalCase') // returns 'esaClacsaP'
* const reversedStr3 = reverseString('foo 😄 bar') // returns 'rab 😄 oof'
*/
declare function reverseString(value: string): string;
//#endregion
export { reverseString };

View file

@ -0,0 +1,17 @@
//#region src/string/reverseString.d.ts
/**
* Reverses a given string.
*
* This function takes a string as input and returns a new string that is the reverse of the input.
*
* @param value - The string that is to be reversed.
* @returns The reversed string.
*
* @example
* const reversedStr1 = reverseString('hello') // returns 'olleh'
* const reversedStr2 = reverseString('PascalCase') // returns 'esaClacsaP'
* const reversedStr3 = reverseString('foo 😄 bar') // returns 'rab 😄 oof'
*/
declare function reverseString(value: string): string;
//#endregion
export { reverseString };

View file

@ -0,0 +1,19 @@
//#region src/string/reverseString.ts
/**
* Reverses a given string.
*
* This function takes a string as input and returns a new string that is the reverse of the input.
*
* @param value - The string that is to be reversed.
* @returns The reversed string.
*
* @example
* const reversedStr1 = reverseString('hello') // returns 'olleh'
* const reversedStr2 = reverseString('PascalCase') // returns 'esaClacsaP'
* const reversedStr3 = reverseString('foo 😄 bar') // returns 'rab 😄 oof'
*/
function reverseString(value) {
return [...value].reverse().join("");
}
//#endregion
exports.reverseString = reverseString;

View file

@ -0,0 +1,19 @@
//#region src/string/reverseString.ts
/**
* Reverses a given string.
*
* This function takes a string as input and returns a new string that is the reverse of the input.
*
* @param value - The string that is to be reversed.
* @returns The reversed string.
*
* @example
* const reversedStr1 = reverseString('hello') // returns 'olleh'
* const reversedStr2 = reverseString('PascalCase') // returns 'esaClacsaP'
* const reversedStr3 = reverseString('foo 😄 bar') // returns 'rab 😄 oof'
*/
function reverseString(value) {
return [...value].reverse().join("");
}
//#endregion
export { reverseString };

View file

@ -0,0 +1,18 @@
//#region src/string/snakeCase.d.ts
/**
* Converts a string to snake case.
*
* Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.
*
* @param str - The string that is to be changed to snake case.
* @returns The converted string to snake case.
*
* @example
* const convertedStr1 = snakeCase('camelCase') // returns 'camel_case'
* const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace'
* const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'
* const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'
*/
declare function snakeCase(str: string): string;
//#endregion
export { snakeCase };

View file

@ -0,0 +1,18 @@
//#region src/string/snakeCase.d.ts
/**
* Converts a string to snake case.
*
* Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.
*
* @param str - The string that is to be changed to snake case.
* @returns The converted string to snake case.
*
* @example
* const convertedStr1 = snakeCase('camelCase') // returns 'camel_case'
* const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace'
* const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'
* const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'
*/
declare function snakeCase(str: string): string;
//#endregion
export { snakeCase };

View file

@ -0,0 +1,21 @@
const require_words = require("./words.js");
//#region src/string/snakeCase.ts
/**
* Converts a string to snake case.
*
* Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.
*
* @param str - The string that is to be changed to snake case.
* @returns The converted string to snake case.
*
* @example
* const convertedStr1 = snakeCase('camelCase') // returns 'camel_case'
* const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace'
* const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'
* const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'
*/
function snakeCase(str) {
return require_words.words(str).map((word) => word.toLowerCase()).join("_");
}
//#endregion
exports.snakeCase = snakeCase;

View file

@ -0,0 +1,21 @@
import { words } from "./words.mjs";
//#region src/string/snakeCase.ts
/**
* Converts a string to snake case.
*
* Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.
*
* @param str - The string that is to be changed to snake case.
* @returns The converted string to snake case.
*
* @example
* const convertedStr1 = snakeCase('camelCase') // returns 'camel_case'
* const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace'
* const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'
* const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'
*/
function snakeCase(str) {
return words(str).map((word) => word.toLowerCase()).join("_");
}
//#endregion
export { snakeCase };

View file

@ -0,0 +1,17 @@
//#region src/string/startCase.d.ts
/**
* Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.
*
* Start case is the naming convention in which each word is written with an initial capital letter.
* @param str - The string to convert.
* @returns The converted string.
*
* @example
* const result1 = startCase('hello world'); // result will be 'Hello World'
* const result2 = startCase('HELLO WORLD'); // result will be 'Hello World'
* const result3 = startCase('hello-world'); // result will be 'Hello World'
* const result4 = startCase('hello_world'); // result will be 'Hello World'
*/
declare function startCase(str: string): string;
//#endregion
export { startCase };

View file

@ -0,0 +1,17 @@
//#region src/string/startCase.d.ts
/**
* Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.
*
* Start case is the naming convention in which each word is written with an initial capital letter.
* @param str - The string to convert.
* @returns The converted string.
*
* @example
* const result1 = startCase('hello world'); // result will be 'Hello World'
* const result2 = startCase('HELLO WORLD'); // result will be 'Hello World'
* const result3 = startCase('hello-world'); // result will be 'Hello World'
* const result4 = startCase('hello_world'); // result will be 'Hello World'
*/
declare function startCase(str: string): string;
//#endregion
export { startCase };

View file

@ -0,0 +1,27 @@
const require_words = require("./words.js");
//#region src/string/startCase.ts
/**
* Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.
*
* Start case is the naming convention in which each word is written with an initial capital letter.
* @param str - The string to convert.
* @returns The converted string.
*
* @example
* const result1 = startCase('hello world'); // result will be 'Hello World'
* const result2 = startCase('HELLO WORLD'); // result will be 'Hello World'
* const result3 = startCase('hello-world'); // result will be 'Hello World'
* const result4 = startCase('hello_world'); // result will be 'Hello World'
*/
function startCase(str) {
const words$1 = require_words.words(str.trim());
let result = "";
for (let i = 0; i < words$1.length; i++) {
const word = words$1[i];
if (result) result += " ";
result += word[0].toUpperCase() + word.slice(1).toLowerCase();
}
return result;
}
//#endregion
exports.startCase = startCase;

View file

@ -0,0 +1,27 @@
import { words } from "./words.mjs";
//#region src/string/startCase.ts
/**
* Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.
*
* Start case is the naming convention in which each word is written with an initial capital letter.
* @param str - The string to convert.
* @returns The converted string.
*
* @example
* const result1 = startCase('hello world'); // result will be 'Hello World'
* const result2 = startCase('HELLO WORLD'); // result will be 'Hello World'
* const result3 = startCase('hello-world'); // result will be 'Hello World'
* const result4 = startCase('hello_world'); // result will be 'Hello World'
*/
function startCase(str) {
const words$1 = words(str.trim());
let result = "";
for (let i = 0; i < words$1.length; i++) {
const word = words$1[i];
if (result) result += " ";
result += word[0].toUpperCase() + word.slice(1).toLowerCase();
}
return result;
}
//#endregion
export { startCase };

View file

@ -0,0 +1,16 @@
//#region src/string/trim.d.ts
/**
* Removes leading and trailing whitespace or specified characters from a string.
*
* @param str - The string from which characters will be trimmed.
* @param chars - The character(s) to remove from the string. Can be a single character or an array of characters.
* @returns The resulting string after the specified characters have been removed.
*
* @example
* trim(" hello "); // "hello"
* trim("--hello--", "-"); // "hello"
* trim("##hello##", ["#", "o"]); // "hell"
*/
declare function trim(str: string, chars?: string | string[]): string;
//#endregion
export { trim };

16
frontend/node_modules/es-toolkit/dist/string/trim.d.ts generated vendored Normal file
View file

@ -0,0 +1,16 @@
//#region src/string/trim.d.ts
/**
* Removes leading and trailing whitespace or specified characters from a string.
*
* @param str - The string from which characters will be trimmed.
* @param chars - The character(s) to remove from the string. Can be a single character or an array of characters.
* @returns The resulting string after the specified characters have been removed.
*
* @example
* trim(" hello "); // "hello"
* trim("--hello--", "-"); // "hello"
* trim("##hello##", ["#", "o"]); // "hell"
*/
declare function trim(str: string, chars?: string | string[]): string;
//#endregion
export { trim };

21
frontend/node_modules/es-toolkit/dist/string/trim.js generated vendored Normal file
View file

@ -0,0 +1,21 @@
const require_trimEnd = require("./trimEnd.js");
const require_trimStart = require("./trimStart.js");
//#region src/string/trim.ts
/**
* Removes leading and trailing whitespace or specified characters from a string.
*
* @param str - The string from which characters will be trimmed.
* @param chars - The character(s) to remove from the string. Can be a single character or an array of characters.
* @returns The resulting string after the specified characters have been removed.
*
* @example
* trim(" hello "); // "hello"
* trim("--hello--", "-"); // "hello"
* trim("##hello##", ["#", "o"]); // "hell"
*/
function trim(str, chars) {
if (chars === void 0) return str.trim();
return require_trimStart.trimStart(require_trimEnd.trimEnd(str, chars), chars);
}
//#endregion
exports.trim = trim;

21
frontend/node_modules/es-toolkit/dist/string/trim.mjs generated vendored Normal file
View file

@ -0,0 +1,21 @@
import { trimEnd } from "./trimEnd.mjs";
import { trimStart } from "./trimStart.mjs";
//#region src/string/trim.ts
/**
* Removes leading and trailing whitespace or specified characters from a string.
*
* @param str - The string from which characters will be trimmed.
* @param chars - The character(s) to remove from the string. Can be a single character or an array of characters.
* @returns The resulting string after the specified characters have been removed.
*
* @example
* trim(" hello "); // "hello"
* trim("--hello--", "-"); // "hello"
* trim("##hello##", ["#", "o"]); // "hell"
*/
function trim(str, chars) {
if (chars === void 0) return str.trim();
return trimStart(trimEnd(str, chars), chars);
}
//#endregion
export { trim };

View file

@ -0,0 +1,20 @@
//#region src/string/trimEnd.d.ts
/**
* Removes trailing whitespace or specified characters from a string.
*
* If `chars` is a string, it should be a single character. To trim a string with multiple characters,
* provide an array instead.
*
* @param str - The string from which trailing characters will be trimmed.
* @param chars - The character(s) to remove from the end of the string.
* @returns The resulting string after the specified trailing character has been removed.
*
* @example
* const trimmedStr1 = trimEnd('hello---', '-') // returns 'hello'
* const trimmedStr2 = trimEnd('123000', '0') // returns '123'
* const trimmedStr3 = trimEnd('abcabcabc', 'c') // returns 'abcabcab'
* const trimmedStr4 = trimEnd('trimmedxxx', 'x') // returns 'trimmed'
*/
declare function trimEnd(str: string, chars?: string | string[]): string;
//#endregion
export { trimEnd };

View file

@ -0,0 +1,20 @@
//#region src/string/trimEnd.d.ts
/**
* Removes trailing whitespace or specified characters from a string.
*
* If `chars` is a string, it should be a single character. To trim a string with multiple characters,
* provide an array instead.
*
* @param str - The string from which trailing characters will be trimmed.
* @param chars - The character(s) to remove from the end of the string.
* @returns The resulting string after the specified trailing character has been removed.
*
* @example
* const trimmedStr1 = trimEnd('hello---', '-') // returns 'hello'
* const trimmedStr2 = trimEnd('123000', '0') // returns '123'
* const trimmedStr3 = trimEnd('abcabcabc', 'c') // returns 'abcabcab'
* const trimmedStr4 = trimEnd('trimmedxxx', 'x') // returns 'trimmed'
*/
declare function trimEnd(str: string, chars?: string | string[]): string;
//#endregion
export { trimEnd };

View file

@ -0,0 +1,31 @@
//#region src/string/trimEnd.ts
/**
* Removes trailing whitespace or specified characters from a string.
*
* If `chars` is a string, it should be a single character. To trim a string with multiple characters,
* provide an array instead.
*
* @param str - The string from which trailing characters will be trimmed.
* @param chars - The character(s) to remove from the end of the string.
* @returns The resulting string after the specified trailing character has been removed.
*
* @example
* const trimmedStr1 = trimEnd('hello---', '-') // returns 'hello'
* const trimmedStr2 = trimEnd('123000', '0') // returns '123'
* const trimmedStr3 = trimEnd('abcabcabc', 'c') // returns 'abcabcab'
* const trimmedStr4 = trimEnd('trimmedxxx', 'x') // returns 'trimmed'
*/
function trimEnd(str, chars) {
if (chars === void 0) return str.trimEnd();
let endIndex = str.length;
switch (typeof chars) {
case "string":
if (chars.length !== 1) throw new Error(`The 'chars' parameter should be a single character string.`);
while (endIndex > 0 && str[endIndex - 1] === chars) endIndex--;
break;
case "object": while (endIndex > 0 && chars.includes(str[endIndex - 1])) endIndex--;
}
return str.substring(0, endIndex);
}
//#endregion
exports.trimEnd = trimEnd;

View file

@ -0,0 +1,31 @@
//#region src/string/trimEnd.ts
/**
* Removes trailing whitespace or specified characters from a string.
*
* If `chars` is a string, it should be a single character. To trim a string with multiple characters,
* provide an array instead.
*
* @param str - The string from which trailing characters will be trimmed.
* @param chars - The character(s) to remove from the end of the string.
* @returns The resulting string after the specified trailing character has been removed.
*
* @example
* const trimmedStr1 = trimEnd('hello---', '-') // returns 'hello'
* const trimmedStr2 = trimEnd('123000', '0') // returns '123'
* const trimmedStr3 = trimEnd('abcabcabc', 'c') // returns 'abcabcab'
* const trimmedStr4 = trimEnd('trimmedxxx', 'x') // returns 'trimmed'
*/
function trimEnd(str, chars) {
if (chars === void 0) return str.trimEnd();
let endIndex = str.length;
switch (typeof chars) {
case "string":
if (chars.length !== 1) throw new Error(`The 'chars' parameter should be a single character string.`);
while (endIndex > 0 && str[endIndex - 1] === chars) endIndex--;
break;
case "object": while (endIndex > 0 && chars.includes(str[endIndex - 1])) endIndex--;
}
return str.substring(0, endIndex);
}
//#endregion
export { trimEnd };

View file

@ -0,0 +1,20 @@
//#region src/string/trimStart.d.ts
/**
* Removes leading whitespace or specified characters from a string.
*
* If `chars` is a string, it should be a single character. To trim a string with multiple characters,
* provide an array instead.
*
* @param str - The string from which leading characters will be trimmed.
* @param chars - The character(s) to remove from the start of the string.
* @returns The resulting string after the specified leading character has been removed.
*
* @example
* const trimmedStr1 = trimStart('---hello', '-') // returns 'hello'
* const trimmedStr2 = trimStart('000123', '0') // returns '123'
* const trimmedStr3 = trimStart('abcabcabc', 'a') // returns 'bcabcabc'
* const trimmedStr4 = trimStart('xxxtrimmed', 'x') // returns 'trimmed'
*/
declare function trimStart(str: string, chars?: string | string[]): string;
//#endregion
export { trimStart };

View file

@ -0,0 +1,20 @@
//#region src/string/trimStart.d.ts
/**
* Removes leading whitespace or specified characters from a string.
*
* If `chars` is a string, it should be a single character. To trim a string with multiple characters,
* provide an array instead.
*
* @param str - The string from which leading characters will be trimmed.
* @param chars - The character(s) to remove from the start of the string.
* @returns The resulting string after the specified leading character has been removed.
*
* @example
* const trimmedStr1 = trimStart('---hello', '-') // returns 'hello'
* const trimmedStr2 = trimStart('000123', '0') // returns '123'
* const trimmedStr3 = trimStart('abcabcabc', 'a') // returns 'bcabcabc'
* const trimmedStr4 = trimStart('xxxtrimmed', 'x') // returns 'trimmed'
*/
declare function trimStart(str: string, chars?: string | string[]): string;
//#endregion
export { trimStart };

View file

@ -0,0 +1,31 @@
//#region src/string/trimStart.ts
/**
* Removes leading whitespace or specified characters from a string.
*
* If `chars` is a string, it should be a single character. To trim a string with multiple characters,
* provide an array instead.
*
* @param str - The string from which leading characters will be trimmed.
* @param chars - The character(s) to remove from the start of the string.
* @returns The resulting string after the specified leading character has been removed.
*
* @example
* const trimmedStr1 = trimStart('---hello', '-') // returns 'hello'
* const trimmedStr2 = trimStart('000123', '0') // returns '123'
* const trimmedStr3 = trimStart('abcabcabc', 'a') // returns 'bcabcabc'
* const trimmedStr4 = trimStart('xxxtrimmed', 'x') // returns 'trimmed'
*/
function trimStart(str, chars) {
if (chars === void 0) return str.trimStart();
let startIndex = 0;
switch (typeof chars) {
case "string":
if (chars.length !== 1) throw new Error(`The 'chars' parameter should be a single character string.`);
while (startIndex < str.length && str[startIndex] === chars) startIndex++;
break;
case "object": while (startIndex < str.length && chars.includes(str[startIndex])) startIndex++;
}
return str.substring(startIndex);
}
//#endregion
exports.trimStart = trimStart;

View file

@ -0,0 +1,31 @@
//#region src/string/trimStart.ts
/**
* Removes leading whitespace or specified characters from a string.
*
* If `chars` is a string, it should be a single character. To trim a string with multiple characters,
* provide an array instead.
*
* @param str - The string from which leading characters will be trimmed.
* @param chars - The character(s) to remove from the start of the string.
* @returns The resulting string after the specified leading character has been removed.
*
* @example
* const trimmedStr1 = trimStart('---hello', '-') // returns 'hello'
* const trimmedStr2 = trimStart('000123', '0') // returns '123'
* const trimmedStr3 = trimStart('abcabcabc', 'a') // returns 'bcabcabc'
* const trimmedStr4 = trimStart('xxxtrimmed', 'x') // returns 'trimmed'
*/
function trimStart(str, chars) {
if (chars === void 0) return str.trimStart();
let startIndex = 0;
switch (typeof chars) {
case "string":
if (chars.length !== 1) throw new Error(`The 'chars' parameter should be a single character string.`);
while (startIndex < str.length && str[startIndex] === chars) startIndex++;
break;
case "object": while (startIndex < str.length && chars.includes(str[startIndex])) startIndex++;
}
return str.substring(startIndex);
}
//#endregion
export { trimStart };

View file

@ -0,0 +1,17 @@
//#region src/string/unescape.d.ts
/**
* Converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `str` to their corresponding characters.
* It is the inverse of `escape`.
*
* @param str The string to unescape.
* @returns Returns the unescaped string.
*
* @example
* unescape('This is a &lt;div&gt; element.'); // returns 'This is a <div> element.'
* unescape('This is a &quot;quote&quot;'); // returns 'This is a "quote"'
* unescape('This is a &#39;quote&#39;'); // returns 'This is a 'quote''
* unescape('This is a &amp; symbol'); // returns 'This is a & symbol'
*/
declare function unescape(str: string): string;
//#endregion
export { unescape };

View file

@ -0,0 +1,17 @@
//#region src/string/unescape.d.ts
/**
* Converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `str` to their corresponding characters.
* It is the inverse of `escape`.
*
* @param str The string to unescape.
* @returns Returns the unescaped string.
*
* @example
* unescape('This is a &lt;div&gt; element.'); // returns 'This is a <div> element.'
* unescape('This is a &quot;quote&quot;'); // returns 'This is a "quote"'
* unescape('This is a &#39;quote&#39;'); // returns 'This is a 'quote''
* unescape('This is a &amp; symbol'); // returns 'This is a & symbol'
*/
declare function unescape(str: string): string;
//#endregion
export { unescape };

View file

@ -0,0 +1,26 @@
//#region src/string/unescape.ts
const htmlUnescapes = {
"&amp;": "&",
"&lt;": "<",
"&gt;": ">",
"&quot;": "\"",
"&#39;": "'"
};
/**
* Converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `str` to their corresponding characters.
* It is the inverse of `escape`.
*
* @param str The string to unescape.
* @returns Returns the unescaped string.
*
* @example
* unescape('This is a &lt;div&gt; element.'); // returns 'This is a <div> element.'
* unescape('This is a &quot;quote&quot;'); // returns 'This is a "quote"'
* unescape('This is a &#39;quote&#39;'); // returns 'This is a 'quote''
* unescape('This is a &amp; symbol'); // returns 'This is a & symbol'
*/
function unescape(str) {
return str.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g, (match) => htmlUnescapes[match] || "'");
}
//#endregion
exports.unescape = unescape;

View file

@ -0,0 +1,26 @@
//#region src/string/unescape.ts
const htmlUnescapes = {
"&amp;": "&",
"&lt;": "<",
"&gt;": ">",
"&quot;": "\"",
"&#39;": "'"
};
/**
* Converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `str` to their corresponding characters.
* It is the inverse of `escape`.
*
* @param str The string to unescape.
* @returns Returns the unescaped string.
*
* @example
* unescape('This is a &lt;div&gt; element.'); // returns 'This is a <div> element.'
* unescape('This is a &quot;quote&quot;'); // returns 'This is a "quote"'
* unescape('This is a &#39;quote&#39;'); // returns 'This is a 'quote''
* unescape('This is a &amp; symbol'); // returns 'This is a & symbol'
*/
function unescape(str) {
return str.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g, (match) => htmlUnescapes[match] || "'");
}
//#endregion
export { unescape };

View file

@ -0,0 +1,18 @@
//#region src/string/upperCase.d.ts
/**
* Converts a string to upper case.
*
* Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character.
*
* @param str - The string that is to be changed to upper case.
* @returns The converted string to upper case.
*
* @example
* const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE'
* const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE'
* const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT'
* const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST'
*/
declare function upperCase(str: string): string;
//#endregion
export { upperCase };

View file

@ -0,0 +1,18 @@
//#region src/string/upperCase.d.ts
/**
* Converts a string to upper case.
*
* Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character.
*
* @param str - The string that is to be changed to upper case.
* @returns The converted string to upper case.
*
* @example
* const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE'
* const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE'
* const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT'
* const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST'
*/
declare function upperCase(str: string): string;
//#endregion
export { upperCase };

View file

@ -0,0 +1,27 @@
const require_words = require("./words.js");
//#region src/string/upperCase.ts
/**
* Converts a string to upper case.
*
* Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character.
*
* @param str - The string that is to be changed to upper case.
* @returns The converted string to upper case.
*
* @example
* const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE'
* const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE'
* const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT'
* const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST'
*/
function upperCase(str) {
const words$1 = require_words.words(str);
let result = "";
for (let i = 0; i < words$1.length; i++) {
result += words$1[i].toUpperCase();
if (i < words$1.length - 1) result += " ";
}
return result;
}
//#endregion
exports.upperCase = upperCase;

View file

@ -0,0 +1,27 @@
import { words } from "./words.mjs";
//#region src/string/upperCase.ts
/**
* Converts a string to upper case.
*
* Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character.
*
* @param str - The string that is to be changed to upper case.
* @returns The converted string to upper case.
*
* @example
* const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE'
* const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE'
* const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT'
* const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST'
*/
function upperCase(str) {
const words$1 = words(str);
let result = "";
for (let i = 0; i < words$1.length; i++) {
result += words$1[i].toUpperCase();
if (i < words$1.length - 1) result += " ";
}
return result;
}
//#endregion
export { upperCase };

View file

@ -0,0 +1,15 @@
//#region src/string/upperFirst.d.ts
/**
* Converts the first character of string to upper case.
*
* @param str - The string that is to be changed
* @returns The converted string.
*
* @example
* const convertedStr1 = upperFirst('fred') // returns 'Fred'
* const convertedStr2 = upperFirst('Fred') // returns 'Fred'
* const convertedStr3 = upperFirst('FRED') // returns 'FRED'
*/
declare function upperFirst(str: string): string;
//#endregion
export { upperFirst };

View file

@ -0,0 +1,15 @@
//#region src/string/upperFirst.d.ts
/**
* Converts the first character of string to upper case.
*
* @param str - The string that is to be changed
* @returns The converted string.
*
* @example
* const convertedStr1 = upperFirst('fred') // returns 'Fred'
* const convertedStr2 = upperFirst('Fred') // returns 'Fred'
* const convertedStr3 = upperFirst('FRED') // returns 'FRED'
*/
declare function upperFirst(str: string): string;
//#endregion
export { upperFirst };

View file

@ -0,0 +1,17 @@
//#region src/string/upperFirst.ts
/**
* Converts the first character of string to upper case.
*
* @param str - The string that is to be changed
* @returns The converted string.
*
* @example
* const convertedStr1 = upperFirst('fred') // returns 'Fred'
* const convertedStr2 = upperFirst('Fred') // returns 'Fred'
* const convertedStr3 = upperFirst('FRED') // returns 'FRED'
*/
function upperFirst(str) {
return str.substring(0, 1).toUpperCase() + str.substring(1);
}
//#endregion
exports.upperFirst = upperFirst;

View file

@ -0,0 +1,17 @@
//#region src/string/upperFirst.ts
/**
* Converts the first character of string to upper case.
*
* @param str - The string that is to be changed
* @returns The converted string.
*
* @example
* const convertedStr1 = upperFirst('fred') // returns 'Fred'
* const convertedStr2 = upperFirst('Fred') // returns 'Fred'
* const convertedStr3 = upperFirst('FRED') // returns 'FRED'
*/
function upperFirst(str) {
return str.substring(0, 1).toUpperCase() + str.substring(1);
}
//#endregion
export { upperFirst };

View file

@ -0,0 +1,39 @@
//#region src/string/words.d.ts
/**
* Regular expression pattern to split strings into words for various case conversions
*
* This pattern matches sequences of characters in a string, considering the following cases:
* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)
* - Sequences of one uppercase letter optionally followed by lowercase letters and digits
* - Single uppercase letters
* - Sequences of digits
* - Emojis and other Unicode characters
*
* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into
* a consistent format like snake case. It also supports emojis and other Unicode characters.
*
* @example
* const matches = 'camelCaseHTTPRequest🚀'.match(CASE_SPLIT_PATTERN);
* // matches: ['camel', 'Case', 'HTTP', 'Request', '🚀']
*/
declare const CASE_SPLIT_PATTERN: RegExp;
/**
* Splits `string` into an array of its words, treating spaces and punctuation marks as separators.
*
* @param str The string to inspect.
* @param [pattern] The pattern to match words.
* @returns Returns the words of `string`.
*
* @example
* words('fred, barney, & pebbles');
* // => ['fred', 'barney', 'pebbles']
*
* words('camelCaseHTTPRequest🚀');
* // => ['camel', 'Case', 'HTTP', 'Request', '🚀']
*
* words('Lunedì 18 Set')
* // => ['Lunedì', '18', 'Set']
*/
declare function words(str: string): string[];
//#endregion
export { words };

View file

@ -0,0 +1,39 @@
//#region src/string/words.d.ts
/**
* Regular expression pattern to split strings into words for various case conversions
*
* This pattern matches sequences of characters in a string, considering the following cases:
* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)
* - Sequences of one uppercase letter optionally followed by lowercase letters and digits
* - Single uppercase letters
* - Sequences of digits
* - Emojis and other Unicode characters
*
* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into
* a consistent format like snake case. It also supports emojis and other Unicode characters.
*
* @example
* const matches = 'camelCaseHTTPRequest🚀'.match(CASE_SPLIT_PATTERN);
* // matches: ['camel', 'Case', 'HTTP', 'Request', '🚀']
*/
declare const CASE_SPLIT_PATTERN: RegExp;
/**
* Splits `string` into an array of its words, treating spaces and punctuation marks as separators.
*
* @param str The string to inspect.
* @param [pattern] The pattern to match words.
* @returns Returns the words of `string`.
*
* @example
* words('fred, barney, & pebbles');
* // => ['fred', 'barney', 'pebbles']
*
* words('camelCaseHTTPRequest🚀');
* // => ['camel', 'Case', 'HTTP', 'Request', '🚀']
*
* words('Lunedì 18 Set')
* // => ['Lunedì', '18', 'Set']
*/
declare function words(str: string): string[];
//#endregion
export { words };

41
frontend/node_modules/es-toolkit/dist/string/words.js generated vendored Normal file
View file

@ -0,0 +1,41 @@
//#region src/string/words.ts
/**
* Regular expression pattern to split strings into words for various case conversions
*
* This pattern matches sequences of characters in a string, considering the following cases:
* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)
* - Sequences of one uppercase letter optionally followed by lowercase letters and digits
* - Single uppercase letters
* - Sequences of digits
* - Emojis and other Unicode characters
*
* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into
* a consistent format like snake case. It also supports emojis and other Unicode characters.
*
* @example
* const matches = 'camelCaseHTTPRequest🚀'.match(CASE_SPLIT_PATTERN);
* // matches: ['camel', 'Case', 'HTTP', 'Request', '🚀']
*/
const CASE_SPLIT_PATTERN = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
/**
* Splits `string` into an array of its words, treating spaces and punctuation marks as separators.
*
* @param str The string to inspect.
* @param [pattern] The pattern to match words.
* @returns Returns the words of `string`.
*
* @example
* words('fred, barney, & pebbles');
* // => ['fred', 'barney', 'pebbles']
*
* words('camelCaseHTTPRequest🚀');
* // => ['camel', 'Case', 'HTTP', 'Request', '🚀']
*
* words('Lunedì 18 Set')
* // => ['Lunedì', '18', 'Set']
*/
function words(str) {
return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
}
//#endregion
exports.words = words;

41
frontend/node_modules/es-toolkit/dist/string/words.mjs generated vendored Normal file
View file

@ -0,0 +1,41 @@
//#region src/string/words.ts
/**
* Regular expression pattern to split strings into words for various case conversions
*
* This pattern matches sequences of characters in a string, considering the following cases:
* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)
* - Sequences of one uppercase letter optionally followed by lowercase letters and digits
* - Single uppercase letters
* - Sequences of digits
* - Emojis and other Unicode characters
*
* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into
* a consistent format like snake case. It also supports emojis and other Unicode characters.
*
* @example
* const matches = 'camelCaseHTTPRequest🚀'.match(CASE_SPLIT_PATTERN);
* // matches: ['camel', 'Case', 'HTTP', 'Request', '🚀']
*/
const CASE_SPLIT_PATTERN = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
/**
* Splits `string` into an array of its words, treating spaces and punctuation marks as separators.
*
* @param str The string to inspect.
* @param [pattern] The pattern to match words.
* @returns Returns the words of `string`.
*
* @example
* words('fred, barney, & pebbles');
* // => ['fred', 'barney', 'pebbles']
*
* words('camelCaseHTTPRequest🚀');
* // => ['camel', 'Case', 'HTTP', 'Request', '🚀']
*
* words('Lunedì 18 Set')
* // => ['Lunedì', '18', 'Set']
*/
function words(str) {
return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
}
//#endregion
export { words };