Modifiers
Modify and transform your content with our collection of efficient and easy-to-use functions designed to dicipher, manipulate, and transform strings.
startWith
Adds a prefix to a string if it doesn't already start with the prefix.
startWithout
Removes a prefix from a string if it starts with the prefix.
endWith
Adds a suffix to a string if it doesn't already end with the suffix.
endWithout
Removes a suffix from a string if it ends with the suffix.
surroundWith
Adds a prefix and suffix to a string if it doesn't already start and end with them.
pluralize
Adds plurals to a string except for excluded words.
singularize
Removes plurals from a string.
ordinalize
Converts a number to a string with ordinal suffix.
stripHtml
Strip HTML tags from a string.
stripWhitespace
Strips whitespace from a string.
stripNumbers
Strips numbers from a string.
stripPunctuation
Strips punctuation from a string.
stripSymbols
Strips symbols from a string.
stripEmojis
Strips emojis from a string (requires ES6 Unicode support) π¦.
slugify
Converts a string to-a-slug.
deslugify
Converts a slug to a string.
camelCase
Removes spaces and capitalizes the first letter of each word except for the first word.
pascalCase
Removes spaces and capitalizes the first letter of each word.
snakeCase
Replaces spaces with underscores and converts to lowercase.
kebabCase
Replaces spaces with hyphens and converts to lowercase.
titleCase
Converts to title case by capitalizing the first letter of each word.
escapeHtml
Escape HTML entities in a string.
unescapeHtml
Unescape HTML entities in a string.