24 lines
958 B
JavaScript
Raw Normal View History

2026-05-31 13:21:13 +02:00
import { lowerCase as lowerCase$1 } from "../../string/lowerCase.mjs";
import { deburr } from "./deburr.mjs";
import { normalizeForCase } from "../_internal/normalizeForCase.mjs";
//#region src/compat/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 {string | object} str - The string that is to be changed to lower case.
* @returns {string} - 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 lowerCase$1(normalizeForCase(deburr(str)));
}
//#endregion
export { lowerCase };