Strings.toCamelCase()

Convert a string to camel-case (varying capitalization instead of spaces/underscores/dashes).

Returns a version of the string with dashes removed, using medial capitalization to separate words instead. See http://en.wikipedia.org/wiki/CamelCase for more information.

Usage

Hover over inputs/exits for more info.

var Strings = require('machinepack-strings');


// Convert a string to camel-case (varying capitalization instead of spaces/underscores/dashes).

Strings.toCamelCase({

string: 'foo-bar-baz',

}).execSync();

Inputs

string required

The string to convert (dash-delimited or otherwise)

'foo-bar-baz'

Exits

error

An unexpected error occurred.

success

OK.

'fooBarBaz'