initial commit
This commit is contained in:
21
node_modules/camel-case/LICENSE
generated
vendored
Normal file
21
node_modules/camel-case/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
50
node_modules/camel-case/README.md
generated
vendored
Normal file
50
node_modules/camel-case/README.md
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# Camel Case
|
||||
|
||||
[![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 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"
|
||||
```
|
||||
|
||||
## Typings
|
||||
|
||||
Includes a [TypeScript definition](camel-case.d.ts).
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/camel-case.svg?style=flat
|
||||
[npm-url]: https://npmjs.org/package/camel-case
|
||||
[downloads-image]: https://img.shields.io/npm/dm/camel-case.svg?style=flat
|
||||
[downloads-url]: https://npmjs.org/package/camel-case
|
||||
[travis-image]: https://img.shields.io/travis/blakeembrey/camel-case.svg?style=flat
|
||||
[travis-url]: https://travis-ci.org/blakeembrey/camel-case
|
||||
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/camel-case.svg?style=flat
|
||||
[coveralls-url]: https://coveralls.io/r/blakeembrey/camel-case?branch=master
|
||||
3
node_modules/camel-case/camel-case.d.ts
generated
vendored
Normal file
3
node_modules/camel-case/camel-case.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare function camelCase (value: string, locale?: string, mergeNumbers?: boolean): string;
|
||||
|
||||
export = camelCase;
|
||||
23
node_modules/camel-case/camel-case.js
generated
vendored
Normal file
23
node_modules/camel-case/camel-case.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
var upperCase = require('upper-case')
|
||||
var sentenceCase = require('sentence-case')
|
||||
|
||||
/**
|
||||
* Camel case a string.
|
||||
*
|
||||
* @param {String} string
|
||||
* @param {String} [locale]
|
||||
* @return {String}
|
||||
*/
|
||||
module.exports = function (string, locale, mergeNumbers) {
|
||||
var result = sentenceCase(string, locale)
|
||||
|
||||
// Replace periods between numeric entities with an underscore.
|
||||
if (!mergeNumbers) {
|
||||
result = result.replace(/(\d) (?=\d)/g, '$1_')
|
||||
}
|
||||
|
||||
// Replace spaces between words with an upper cased character.
|
||||
return result.replace(/ (.)/g, function (m, $1) {
|
||||
return upperCase($1, locale)
|
||||
})
|
||||
}
|
||||
57
node_modules/camel-case/package.json
generated
vendored
Normal file
57
node_modules/camel-case/package.json
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "camel-case",
|
||||
"version": "1.2.2",
|
||||
"description": "Camel case a string",
|
||||
"main": "camel-case.js",
|
||||
"typings": "camel-case.d.ts",
|
||||
"files": [
|
||||
"camel-case.js",
|
||||
"camel-case.d.ts",
|
||||
"LICENSE"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "standard",
|
||||
"test-std": "mocha -- -R spec --bail",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail",
|
||||
"test": "npm run lint && npm run test-cov"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/blakeembrey/camel-case.git"
|
||||
},
|
||||
"keywords": [
|
||||
"camel",
|
||||
"case",
|
||||
"camelcase",
|
||||
"camel-case",
|
||||
"dash",
|
||||
"hyphen",
|
||||
"dot",
|
||||
"underscore",
|
||||
"lodash",
|
||||
"separator",
|
||||
"string",
|
||||
"text",
|
||||
"convert"
|
||||
],
|
||||
"author": {
|
||||
"name": "Blake Embrey",
|
||||
"email": "hello@blakeembrey.com",
|
||||
"url": "http://blakeembrey.me"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/blakeembrey/camel-case/issues"
|
||||
},
|
||||
"homepage": "https://github.com/blakeembrey/camel-case",
|
||||
"devDependencies": {
|
||||
"istanbul": "^0.3.0",
|
||||
"mocha": "^2.2.1",
|
||||
"pre-commit": "^1.0.6",
|
||||
"standard": "^3.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"sentence-case": "^1.1.1",
|
||||
"upper-case": "^1.1.1"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user