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 > “phrasify”

External module: “phrasify”

Index

Interfaces

Functions

Object literals


Functions

phrasify

phrasify(input?: PhrasifySettings): Function

phrasify(input: string): string

Defined in phrasify.ts:55

Return a function that transform a string into a space separated phrase

const phraser = phrasify({ numbers: true });

phraser('dataVALUE2-input'); // -> data VALUE 2 input
phraser('XMLDataInput'); // -> XML data input

Parameters:

Param Type Description
input PhrasifySettings The settings for the returned transform method

Returns: Function

Defined in phrasify.ts:68

Transform a string into a space separated phrase

phrasify('dataVALUE2-input'); // -> data VALUE2 input
phrasify('XMLDataInput'); // -> XML data input

Parameters:

Param Type Description
input string The string to transform

Returns: string


seperateWords

seperateWords(settings: PhrasifySettings, str: string): string

Defined in phrasify.ts:27

Transform a string into a space separated phrase

seperateWords('dataValue2-input'); // -> data Value2 input

Parameters:

Param Type Description
settings PhrasifySettings The settings for the word separation
str string The string to transform

Returns: string


Object literal: defaultSettings

numbers

● numbers: false = false

Defined in phrasify.ts:12