Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

case-format-converter

AkshayWay5MIT1.2.1

npm package to change word format

[npm, word, converter, format, change-case, word-case, camel-case, pascal-case, snake-case, kebab-case, train-case, title-Case, pascal-case, screaming-snake-case

readme

npm-word-format-converter

npm package to change word format

This is Node.js based library. It is providing word formating like camel case, snacke case etc.,

Installation

npm i case-format-converter

In Node.js:

var cfc = require("case-format-converter");
//camelcase
console.log(cfc.camelCase("word case format to change string into camelcase"));
//wordCaseFormatToChangeStringIntoCamelcase

//snakecase
console.log(cfc.snakeCase("word case format to change string into snakecase"));
//word_case_format_to_change_string_into_snakecase

//kebabcase
console.log(cfc.kebabCase("word case format to change string into kebabcase"));
//word-case-format-to-change-string-into-kebabcase

//traincase
console.log(cfc.trainCase("word case format to change string into traincase"));
//Word-Case-Format-To-Change-String-Into-Traincase

//titlecase
console.log(cfc.titleCase("word case format to change string into titlecase"));
//Word Case Format To Change String Into Titlecase

//pascalcase
console.log(
  cfc.pascalCase("word case format to change string into pascalcase")
);
//WordCaseFormatToChangeStringIntoPascalcase

//screming snakecase
console.log(
  cfc.screamingSnakeCase(
    "word case format to change string into screming snakecase"
  )
);
//WORD_CASE_FORMAT_TO_CHANGE_STRING_INTO_SCREMING_SNAKECASE