@agape/string
String and token manipulation
Synopsis
import {
camelize,
classify,
pluralize,
titalize,
tokenize,
verbalize
} from '@agape/string'
camelize('foo bar') // fooBar
classify('Foo bar') // FooBar
pluralize('foo') // foos
titalize('a foo a bar') // A Foo a Bar
tokenize('Foo bar') // foo-bar
verbalize('foo-bar') // Foo bar
Description
Translate strings between different representations.
Functions
Convert to camel case.
Remove all symbols and spaces, captialize words.
Adds an 's' to most words. Words that end in 'y' are changed to 'ies',
words that end in 'us' are changed to 'i'.
The first letter of each word is capitalized with the exception of
a, an, and, if, in, of, on, the
which are only capitalized if they
are the first word in the string, otherwise they are converted to
lowercase.
Converted to lower case, word boundaries replaced with dashes.
First character capitalized, word boundaries replaced with spaces.
Author
Maverik Minett maverik.minett@gmail.com
Copyright
© 2020 Maverik Minett
License
MIT