Socket
Socket
Sign inDemoInstall

pascalcase

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pascalcase

Convert a string to pascal-case.


Version published
Maintainers
1
Install size
5.10 kB
Created

Package description

What is pascalcase?

The pascalcase npm package is a simple utility that converts strings into PascalCase format. This can be useful for formatting variable names, class names, or other identifiers in programming to adhere to PascalCase naming conventions.

What are pascalcase's main functionalities?

String Conversion to PascalCase

Converts a given string to PascalCase by splitting the string into words, capitalizing the first letter of each word, and then concatenating them without spaces.

"hello world".split(' ').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join('')

Other packages similar to pascalcase

Readme

Source

pascalcase NPM version

Convert a string to pascal-case.

Install

Install with npm

$ npm i pascalcase --save

Usage

var pascalcase = require('pascalcase');

pascalcase('a');
//=> 'A'

pascalcase('foo bar baz');
//=> 'FooBarBaz'

pascalcase('foo_bar-baz');
//=> 'FooBarBaz'

pascalcase('foo.bar.baz');
//=> 'FooBarBaz'

pascalcase('foo/bar/baz');
//=> 'FooBarBaz'

pascalcase('foo[bar)baz');
//=> 'FooBarBaz'

pascalcase('#foo+bar*baz');
//=> 'FooBarBaz'

pascalcase('$foo~bar`baz');
//=> 'FooBarBaz'

pascalcase('_foo_bar-baz-');
//=> 'FooBarBaz'
  • justified: Wrap words to a specified length and justified the text.
  • pad-left: Left pad a string with zeros or a specified string. Fastest implementation.
  • pad-right: Right pad a string with zeros or a specified string. Fastest implementation.
  • repeat-string: Repeat the given string n times. Fastest implementation for repeating a string.
  • word-wrap: Wrap words to a specified length.

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

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

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on August 19, 2015.

Keywords

FAQs

Last updated on 19 Aug 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc