All Projects → jonschlinkert → pascalcase

jonschlinkert / pascalcase

Licence: MIT license
Convert a string to pascal case (upper camel case). Used by more than 8.7 million projects on GitHub! Please follow this library's author: https://github.com/jonschlinkert

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pascalcase

stringy
Convert string to camel case, snake case, kebab case / slugify, custom delimiter, pad string, tease string and many other functionalities with help of by Stringy package.
Stars: ✭ 137 (+291.43%)
Mutual labels:  string, camel-case, camelcase
case-converter
Convert strings between 13 naming conventions: Snake case, Camel case, Kebab case, Pascal case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Title case, Sentence case and Dot notation.
Stars: ✭ 148 (+322.86%)
Mutual labels:  camel-case, pascal-case
recase
♻️ Convert strings to any case.
Stars: ✭ 183 (+422.86%)
Mutual labels:  camelcase, pascalcase
common-words
Updated list of the 100 most common words in the English language. Useful for excluding these words from arrays.
Stars: ✭ 13 (-62.86%)
Mutual labels:  string, jonschlinkert
is-primitive
Is the typeof value a javascript primitive?
Stars: ✭ 35 (+0%)
Mutual labels:  string, jonschlinkert
Voca
The ultimate JavaScript string library
Stars: ✭ 3,387 (+9577.14%)
Mutual labels:  string, case
Blitz
Android Library: Set self-updating string with relative time in TextView (e.g. 5 minutes ago)
Stars: ✭ 217 (+520%)
Mutual labels:  string
Superstring
A fast and memory-optimized string library for C++
Stars: ✭ 252 (+620%)
Mutual labels:  string
Str
A fast, solid and strong typed string manipulation library with multibyte support
Stars: ✭ 199 (+468.57%)
Mutual labels:  string
Libchef
🍀 c++ standalone header-only basic library. || c++头文件实现无第三方依赖基础库
Stars: ✭ 178 (+408.57%)
Mutual labels:  string
camelcaseplugin
CamelCasePlugin for IDEA IDEs
Stars: ✭ 49 (+40%)
Mutual labels:  camelcase
cs string
Header-only library providing unicode aware string support for C++
Stars: ✭ 91 (+160%)
Mutual labels:  string
Case
String case utitility: convert, identify, flip, extend
Stars: ✭ 237 (+577.14%)
Mutual labels:  string
Codejam
Set of handy reusable .NET components that can simplify your daily work and save your time when you copy and paste your favorite helper methods and classes from one project to another
Stars: ✭ 217 (+520%)
Mutual labels:  string
camel-lsp-client-vscode
This is a client implementation of the Apache Camel Language Server Protocol for Visual Studio Code
Stars: ✭ 24 (-31.43%)
Mutual labels:  camel
Util
A collection of useful utility functions
Stars: ✭ 201 (+474.29%)
Mutual labels:  string
NString
A collection of utilities for working with strings in .NET.
Stars: ✭ 34 (-2.86%)
Mutual labels:  string
Printj
📜 sprintf for JS
Stars: ✭ 182 (+420%)
Mutual labels:  string
Number To Words
Number to string standalone PHP library with i18n. Drivers for numbers and currency included.
Stars: ✭ 234 (+568.57%)
Mutual labels:  string
Data-Structure-Algorithm-Programs
This Repo consists of Data structures and Algorithms
Stars: ✭ 464 (+1225.71%)
Mutual labels:  string

pascalcase NPM version NPM monthly downloads NPM total downloads Tests

Convert a string to pascal case (upper camelcase).

Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your ❤️ and support.

Install

Install with npm (requires Node.js >=14):

$ npm install --save pascalcase

Prerequisites

Requires Node.js version >= 14.

Usage

import pascalcase from 'pascalcase';
// or the following if you prefer
import { pascalcase } from 'pascalcase';

console.log(pascalcase('a')); //=> 'A'
console.log(pascalcase('foo bar baz')); //=> 'FooBarBaz'
console.log(pascalcase('  foo bar baz  ')); //=> 'FooBarBaz'
console.log(pascalcase('foo_bar-baz')); //=> 'FooBarBaz'
console.log(pascalcase('foo.bar.baz')); //=> 'FooBarBaz'
console.log(pascalcase('foo/bar/baz')); //=> 'FooBarBaz'
console.log(pascalcase('foo[bar)baz')); //=> 'FooBarBaz'
console.log(pascalcase('#foo+bar*baz')); //=> 'FooBarBaz'
console.log(pascalcase('$foo~bar`baz')); //=> 'FooBarBaz'
console.log(pascalcase('_foo_bar-baz-')); //=> 'FooBarBaz'
console.log(pascalcase('foo 2 bar 5 baz')); //=> 'Foo2Bar5Baz'
console.log(pascalcase('foo2bar5baz')); //=> 'Foo2bar5baz'

Uppercase character sequences

If you wish to preserve upper case character sequences, you may pass an options object with the preserveConsecutiveUppercase option set to true:

console.log(pascalcase('The IRS Is Mean')); //=> 'TheIrsIsMean
console.log(pascalcase('The IRS Is Mean', { preserveConsecutiveUppercase: true })); //=> TheIRSIsMean

console.log(pascalcase('We saw a UFO')); //=> WeSawAUfo
console.log(pascalcase('We saw a UFO', { preserveConsecutiveUppercase: true })); //=> WeSawAUFO

Options

All options are passed to sindresorhus/camelcase, please visit that project to learn about all available options.

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running Tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test
Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Related projects

You might also be interested in these projects:

  • ansi-colors: Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in… more | homepage
  • justified: Wraps words to a specified length and justifies the text in each line. | homepage
  • randomatic: Generate randomized strings of a specified length using simple character sequences. The original generate-password. | homepage
  • word-wrap: Wrap words to a specified length. | homepage

Author

Jon Schlinkert

License

Copyright © 2021, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.8.0, on December 29, 2021.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].