react-scripts
Version:
Configuration and scripts for Create React App.
51 lines (34 loc) • 1.64 kB
Markdown
case a string. Explicitly adds a single underscore between groups of numbers to maintain readability and reversibility (E.g. `1.20.5` becomes `1_20_5`, not `1205`), by default.
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.
## Installation
### Node
```
npm install camel-case --save
```
## Usage
```javascript
var camelCase = require('camel-case')
camelCase('string') //=> "string"
camelCase('dot.case') //=> "dotCase"
camelCase('PascalCase') //=> "pascalCase"
camelCase('version 1.2.10') //=> "version1_2_10"
camelCase('STRING 1.2', 'tr') //=> "strıng1_2"
camelCase('string 1 2 3', null, true) //=> "string123"
```
Includes a [TypeScript definition](camel-case.d.ts).
MIT
[ ]: https://img.shields.io/npm/v/camel-case.svg?style=flat
[ ]: https://npmjs.org/package/camel-case
[ ]: https://img.shields.io/npm/dm/camel-case.svg?style=flat
[ ]: https://npmjs.org/package/camel-case
[ ]: https://img.shields.io/travis/blakeembrey/camel-case.svg?style=flat
[ ]: https://travis-ci.org/blakeembrey/camel-case
[ ]: https://img.shields.io/coveralls/blakeembrey/camel-case.svg?style=flat
[ ]: https://coveralls.io/r/blakeembrey/camel-case?branch=master
[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
Camel