vanillajs-helpers

Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS

View the Project on GitHub Tokimon/vanillajs-helpers

vanillajs-helpers > “dashed”

External module: “dashed”

Index

Functions


Functions

dashed

dashed(str: string, settings?: PhrasifySettings): string

Defined in dashed.ts:16

Transform phrase into a dashed phrase (eg. ‘camelCase’ -> ‘camel-case’ or ‘spaced phrase’ -> ‘spaced-phrase’)

dashed('some dashed phrase'); // -> some-dashed-phrase
dasher('dash version1 beta', { numbers: true }); // -> dash-version-1-beta

Parameters:

Param Type Description
str string String to transform
settings PhrasifySettings Settings to pass to the phrasify function

Returns: string