JSPM

converting-case

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q26553F
  • License ISC

This package is used to convert cases.

Package Exports

  • converting-case

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (converting-case) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

converting-case

This module is used to convert cases.

install

npm install converting-case

usage

//NodeJS
const convert = require("converting-case");

console.log("camelCase", convert.camelCase("Test String Demo")); //camelCase testStringDemo
console.log("constantCase", convert.constantCase("Test String Demo")); //constantCase TEST_STRING_DEMO
console.log("dotCase", convert.dotCase("Test String Demo")); //dotCase test.string.demo
console.log("headerCase", convert.headerCase("Test String Demo")); //headerCase Test-String-Demo
console.log("paramCase", convert.paramCase("Test String Demo")); //paramCase test-string-demo
console.log("pascalCase", convert.pascalCase("Test String Demo")); //pascalCase TestStringDemo
console.log("pathCase", convert.pathCase("Test String Demo")); //pathCase test/string/demo
console.log("sentenceCase", convert.sentenceCase("Test String Demo")); //sentenceCase Test string demo
console.log("snakeCase", convert.snakeCase("Test String Demo")); //snakeCase test_string_demo
console.log("swapCase", convert.swapCase("Test String Demo")); //swapCase tEST sTRING dEMO
console.log("titleCase", convert.titleCase("Test String Demo")); //titleCase Test String Demo
console.log("upperCase", convert.upperCase("Test String Demo")); //upperCase TEST STRING DEMO
console.log("lowerCase", convert.lowerCase("Test String Demo")); //lowerCase test string demo

//Browser
import {
  camelCase,
  constantCase,
  dotCase,
  headerCase,
  paramCase,
  pascalCase,
  pathCase,
  sentenceCase,
  snakeCase,
  swapCase,
  titleCase,
  upperCase,
  lowerCase
} from "converting-case";

console.log("camelCase", camelCase("Test String Demo")); //camelCase testStringDemo
console.log("constantCase", constantCase("Test String Demo")); //constantCase TEST_STRING_DEMO
console.log("dotCase", dotCase("Test String Demo")); //dotCase test.string.demo
console.log("headerCase", headerCase("Test String Demo")); //headerCase Test-String-Demo
console.log("paramCase", paramCase("Test String Demo")); //paramCase test-string-demo
console.log("pascalCase", pascalCase("Test String Demo")); //pascalCase TestStringDemo
console.log("pathCase", pathCase("Test String Demo")); //pathCase test/string/demo
console.log("sentenceCase", sentenceCase("Test String Demo")); //sentenceCase Test string demo
console.log("snakeCase", snakeCase("Test String Demo")); //snakeCase test_string_demo
console.log("swapCase", swapCase("Test String Demo")); //swapCase tEST sTRING dEMO
console.log("titleCase", titleCase("Test String Demo")); //titleCase Test String Demo
console.log("upperCase", upperCase("Test String Demo")); //upperCase TEST STRING DEMO
console.log("lowerCase", lowerCase("Test String Demo")); //lowerCase test string demo