uppercamelcase
v3.0.0
Published
Convert a dash/dot/underscore/space separated string to UpperCamelCase
Downloads
399,193
Maintainers
Readme
UpperCamelCase
Convert a dash/dot/underscore/space separated string to UpperCamelCase:
foo-bar
→FooBar
Install
$ npm install --save uppercamelcase
Usage
const upperCamelCase = require('uppercamelcase');
upperCamelCase('foo-bar');
//=> FooBar
upperCamelCase('foo_bar');
//=> FooBar
upperCamelCase('Foo-Bar');
//=> FooBar
upperCamelCase('--foo.bar');
//=> FooBar
upperCamelCase('__foo__bar__');
//=> FooBar
upperCamelCase('foo bar');
//=> FooBar
console.log(process.argv[3]);
//=> --foo-bar
upperCamelCase(process.argv[3]);
//=> FooBar
upperCamelCase('foo', 'bar');
//=> 'FooBar'
upperCamelCase('__foo__', '--bar');
//=> 'FooBar'
Related
camelcase
- The lowerCamelCase variant
License
MIT © Sam Verschueren