diff options
| author | ruki <waruqi@gmail.com> | 2018-11-08 00:38:48 +0800 |
|---|---|---|
| committer | ruki <waruqi@gmail.com> | 2018-11-07 21:53:09 +0800 |
| commit | 26105034da4fcce7ac883c899d781f016559310d (patch) | |
| tree | c459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/camel-case | |
| parent | 2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff) | |
| download | xmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip | |
switch to vuepress
Diffstat (limited to 'node_modules/camel-case')
| -rw-r--r-- | node_modules/camel-case/LICENSE | 21 | ||||
| -rw-r--r-- | node_modules/camel-case/camel-case.d.ts | 3 | ||||
| -rw-r--r-- | node_modules/camel-case/camel-case.js | 23 | ||||
| -rw-r--r-- | node_modules/camel-case/package.json | 56 |
4 files changed, 103 insertions, 0 deletions
diff --git a/node_modules/camel-case/LICENSE b/node_modules/camel-case/LICENSE new file mode 100644 index 00000000..983fbe8a --- /dev/null +++ b/node_modules/camel-case/LICENSE @@ -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. diff --git a/node_modules/camel-case/camel-case.d.ts b/node_modules/camel-case/camel-case.d.ts new file mode 100644 index 00000000..782ef3b5 --- /dev/null +++ b/node_modules/camel-case/camel-case.d.ts @@ -0,0 +1,3 @@ +declare function camelCase (value: string, locale?: string, mergeNumbers?: boolean): string; + +export = camelCase; diff --git a/node_modules/camel-case/camel-case.js b/node_modules/camel-case/camel-case.js new file mode 100644 index 00000000..1be652e0 --- /dev/null +++ b/node_modules/camel-case/camel-case.js @@ -0,0 +1,23 @@ +var upperCase = require('upper-case') +var noCase = require('no-case') + +/** + * Camel case a string. + * + * @param {string} value + * @param {string} [locale] + * @return {string} + */ +module.exports = function (value, locale, mergeNumbers) { + var result = noCase(value, locale) + + // Replace periods between numeric entities with an underscore. + if (!mergeNumbers) { + result = result.replace(/ (?=\d)/g, '_') + } + + // Replace spaces between words with an upper cased character. + return result.replace(/ (.)/g, function (m, $1) { + return upperCase($1, locale) + }) +} diff --git a/node_modules/camel-case/package.json b/node_modules/camel-case/package.json new file mode 100644 index 00000000..725b39b0 --- /dev/null +++ b/node_modules/camel-case/package.json @@ -0,0 +1,56 @@ +{ + "name": "camel-case", + "version": "3.0.0", + "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-spec": "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.4.3", + "mocha": "^2.2.1", + "standard": "^7.1.2" + }, + "dependencies": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } +} |
