/string-modifier

Convert string to differents notations

Primary LanguageJavaScriptMIT LicenseMIT

String modifier

Install

npm i -E string-modifier

Import

import convertTo from "string-modifier"

Examples

const textToConvert = "Some long text to convert"

const camelText = convertTo.camelCase(textToConvert) // => someLongTextToConvert

const pascalText = convertTo.pascalCase(textToConvert) // => SomeLongTextToConvert

const kebabText = convertTo.kebabCase(textToConvert) // => some-long-text-to-convert

const snakeText = convertTo.snakeCase(textToConvert) // => some_long_text_to_convert

Special Thanks

Special thanks to lombervid who provided ideas for functionality that could be added to the project