drivetribe-string-formatters
Collection of string formatter functions to change strings.
Install
Install the module directly from npm:
npm install drivetribe-string-formatters --save
Formatters
Abbreviate
Abbreviate by initials of first three words found in string, ie "Lorem ipsum dolor sit amet" -> "Lid".
abbreviate(quant: string): string
Example
; ; // "Lid"; // "Li"
Remove non alphanumeric
Remove non alphanumeric chararacters in string, ie '\/-12 3asd./,\][-=+_!@£$%^&*(±)?><~'
-> "123asd".
removeNonAlphaNumeric(quant: string): string
Example
; ; // "123asd"