lowerCase

Convert a string to lowercase words separated by single spaces, splitting camelCase, snake_case, and kebab-case input first.

Usage

Converts a string to lowercase format with words separated by spaces.

import { lowerCase } from '@movk/core'

lowerCase('firstName') // => 'first name'
lowerCase('First_Name') // => 'first name'
lowerCase('FIRST-NAME') // => 'first name'
lowerCase('XMLHttpRequest') // => 'xml http request'

API

lowerCase(str: string): string

Parameters

str
string required
The string to convert.

Returns

string
Returns the string in lowercase format.

Changelog

No recent changes
Copyright © 2024 - 2026 YiXuan - MIT License