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/snakeCase.mjs generated vendored Normal file
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 {string} str - The string that is to be changed to snake case.
* @returns {string} - 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 };