Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including pascal-case with all npm packages installed. Try it out:

var pascalCase = require("pascal-case")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

pascal-case v2.0.1

Pascal case a string

Pascal Case

NPM version NPM downloads Build status Test coverage

Pascal case a string. Explicitly adds a single underscore between groups of numbers to keep readability (E.g. 1.20.5 becomes 1_20_5, not 1205).

Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a toString property, numbers and booleans. Empty values (null and undefined) will result in an empty string.


npm install pascal-case --save


var pascalCase = require('pascal-case')

pascalCase('string')        //=> "String"
pascalCase('camelCase')     //=> "CamelCase"
pascalCase('sentence case') //=> "SentenceCase"

pascalCase('MY STRING', 'tr') //=> "MyStrıng"


Includes a TypeScript definition.



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free