José Quiñones Flores 4564da0130 Added Laravel project and removed sensitive data | 4 years ago | |
---|---|---|
.. | ||
LICENSE | 4 years ago | |
README.md | 4 years ago | |
camel-case.d.ts | 4 years ago | |
camel-case.js | 4 years ago | |
package.json | 4 years ago |
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.
npm install camel-case --save
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.
MIT