Strings.toKebabCase()

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

Usage

Hover over inputs/exits for more info.

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


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

Strings.toKebabCase({

string: 'fooBar_baz bong___',

}).execSync();

Inputs

string required

The string to convert.

'fooBar_baz bong___'

Exits

error

An unexpected error occurred.

success

OK.

'foo-bar-baz-bong'