function camel
camel(text: string): string

Converts the string to camelCase by removing punctuation, trimming extra spaces, and lowercasing the first word with subsequent words capitalized.

Examples

Example 1

camel(null); // ""
camel("Hello World"); // "helloWorld"
camel("user_profile_page"); // "userProfilePage"
camel("HELLO-WORLD"); // "helloWorld"

Parameters

text: string

Return Type

string

Usage

import { camel } from ".";