Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

21
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 {string} str - The string from which characters will be trimmed.
* @param {string | string[]} chars - The character(s) to remove from the string. Can be a single character or an array of characters.
* @returns {string} - 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 };