1. pascal-case
Transform into a string of capitalized words without separators
pascal-case
Package: pascal-case
Created by: blakeembrey
Last modified: Sat, 30 Sep 2023 02:35:45 GMT
Version: 4.0.0
License: MIT
Downloads: 61,584,988
Repository: https://github.com/blakeembrey/change-case

Install

npm install pascal-case
yarn add pascal-case

Pascal Case

Transform into a string of capitalized words without separators.

Installation

npm install pascal-case --save

Usage

 import { pascalCase } from "pascal-case";

pascalCase("string"); //=> "String"
pascalCase("dot.case"); //=> "DotCase"
pascalCase("PascalCase"); //=> "PascalCase"
pascalCase("version 1.2.10"); //=> "Version_1_2_10"

The function also accepts options.

Merge Numbers

If you'd like to remove the behavior prefixing _ before numbers, you can use pascalCaseTransformMerge:

 import { pascalCaseTransformMerge } from "pascal-case";

pascalCase("version 12", { transform: pascalCaseTransformMerge }); //=> "Version12"

License

MIT

Dependencies

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin