wallet-core/node_modules/camelcase/readme.md

58 lines
1.0 KiB
Markdown
Raw Normal View History

2016-10-10 03:43:44 +02:00
# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase)
> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar`
## Install
```
2016-10-10 03:43:44 +02:00
$ npm install --save camelcase
```
## Usage
```js
const camelCase = require('camelcase');
2016-10-10 03:43:44 +02:00
camelCase('foo-bar');
//=> 'fooBar'
2016-10-10 03:43:44 +02:00
camelCase('foo_bar');
//=> 'fooBar'
2016-10-10 03:43:44 +02:00
camelCase('Foo-Bar');
//=> 'fooBar'
2016-10-10 03:43:44 +02:00
camelCase('--foo.bar');
//=> 'fooBar'
2016-10-10 03:43:44 +02:00
camelCase('__foo__bar__');
//=> 'fooBar'
2016-10-10 03:43:44 +02:00
camelCase('foo bar');
//=> 'fooBar'
2016-10-10 03:43:44 +02:00
console.log(process.argv[3]);
//=> '--foo-bar'
2016-10-10 03:43:44 +02:00
camelCase(process.argv[3]);
//=> 'fooBar'
2016-10-10 03:43:44 +02:00
camelCase('foo', 'bar');
//=> 'fooBar'
2016-10-10 03:43:44 +02:00
camelCase('__foo__', '--bar');
//=> 'fooBar'
2016-10-10 03:43:44 +02:00
```
## Related
- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module
- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase
2016-10-10 03:43:44 +02:00
## License
2017-08-14 05:01:11 +02:00
MIT © [Sindre Sorhus](https://sindresorhus.com)