camelCase

string

Converts string to camel case.

Signature

camelCase(str: string): string

Parameters

NameTypeDescription
strstringThe string to convert

Returns

string - Returns the camel cased string

Examples

Basic Usage

import { camelCase } from 'dashlite'

const result = camelCase('Foo Bar')
console.log(result)

Output:

fooBar

With Hyphens

import { camelCase } from 'dashlite'

const result = camelCase('--foo-bar--')
console.log(result)

Output:

fooBar

Available since version 1.0.0