camel-case 0 travis-ci npm

Camel case a string in JavaScript

3 years after MIT

Camel Case

NPM version NPM downloads Build status Test coverage

Camel 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

var camelCase = require('camel-case')

camelCase('string')         //=> "string"
camelCase('dot.case')       //=> "dotCase"
camelCase('PascalCase')     //=> "pascalCase"
camelCase('version 1.2.10') //=> "version_1_2_10"

camelCase('STRING 1.2', 'tr') //=> "strıng_1_2"

camelCase('string 1 2 3', null, true) //=> "string123"

Typings

Includes a TypeScript definition.

License

MIT

Related Repositories

change-case

change-case

Convert strings between camelCase, PascalCase, Title Case, snake_case and more ...

Inflector

Inflector

Multilingual inflector that transforms words from singular to plural, underscore ...

camel

camel

Tiny library to handle words case transformation. ...

microservice-camel-in-action

microservice-camel-in-action

Camel MicroServices running locally, using Docker or as Kubernetes Service ...

to-camel-case

to-camel-case

Convert a string to a camel case. ...


Top Contributors

blakeembrey tomByrer greenkeeperio-bot gdi2290

Releases

-   v3.0.0 zip tar
-   v2.1.0 zip tar
-   v2.0.0 zip tar
-   v1.2.2 zip tar
-   v1.2.1 zip tar
-   v1.2.0 zip tar
-   v1.1.2 zip tar
-   v1.1.1 zip tar
-   v1.1.0 zip tar
-   v1.0.2 zip tar
-   v1.0.1 zip tar
-   v1.0.0 zip tar
-   v0.1.0 zip tar
-   v0.0.2 zip tar
-   v0.0.1 zip tar