@northscaler/string-support
v3.3.1
Published
Convenient string utilities
Downloads
16
Readme
string-support
This package contains various string utilities.
Snake & Camel Case Conversions
NOTE: These string utilities are deprecated in favor of lodash's snakeCase and camelCase functions. These will no longer be maintained and users are encouraged to port to the aforelinked lodash methods.
Camel case to snake
toSnake(camel, upper = false)
: converts camel case to snake, lower case by defaulttoUpperSnake(camel)
: converts camel case to upper case snaketoLowerSnake(camel)
: converts camel case to lower case snake
Snake to camel case
toCamel(snake, upper = true)
: converts snake to camel case, leading upper by defaulttoUpperCamel(snake)
: converts snake to leading upper camel casetoLowerCamel(snake)
: converts snake to leading lower camel case