aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase')
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/index.js64
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/license21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/package.json44
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/readme.md57
4 files changed, 0 insertions, 186 deletions
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/index.js
deleted file mode 100644
index c8492a2286..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/index.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-function preserveCamelCase(str) {
- let isLastCharLower = false;
- let isLastCharUpper = false;
- let isLastLastCharUpper = false;
-
- for (let i = 0; i < str.length; i++) {
- const c = str[i];
-
- if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) {
- str = str.substr(0, i) + '-' + str.substr(i);
- isLastCharLower = false;
- isLastLastCharUpper = isLastCharUpper;
- isLastCharUpper = true;
- i++;
- } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) {
- str = str.substr(0, i - 1) + '-' + str.substr(i - 1);
- isLastLastCharUpper = isLastCharUpper;
- isLastCharUpper = false;
- isLastCharLower = true;
- } else {
- isLastCharLower = c.toLowerCase() === c;
- isLastLastCharUpper = isLastCharUpper;
- isLastCharUpper = c.toUpperCase() === c;
- }
- }
-
- return str;
-}
-
-module.exports = function (str) {
- if (arguments.length > 1) {
- str = Array.from(arguments)
- .map(x => x.trim())
- .filter(x => x.length)
- .join('-');
- } else {
- str = str.trim();
- }
-
- if (str.length === 0) {
- return '';
- }
-
- if (str.length === 1) {
- return str.toLowerCase();
- }
-
- if (/^[a-z0-9]+$/.test(str)) {
- return str;
- }
-
- const hasUpperCase = str !== str.toLowerCase();
-
- if (hasUpperCase) {
- str = preserveCamelCase(str);
- }
-
- return str
- .replace(/^[_.\- ]+/, '')
- .toLowerCase()
- .replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase());
-};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/package.json
deleted file mode 100644
index a174878a6f..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "_from": "camelcase@^4.1.0",
- "_id": "camelcase@4.1.0",
- "_inBundle": false,
- "_integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
- "_location": "/libnpx/yargs/camelcase",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "camelcase@^4.1.0",
- "name": "camelcase",
- "escapedName": "camelcase",
- "rawSpec": "^4.1.0",
- "saveSpec": null,
- "fetchSpec": "^4.1.0"
- },
- "_requiredBy": [
- "/libnpx/yargs",
- "/libnpx/yargs/yargs-parser"
- ],
- "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "_shasum": "d545635be1e33c542649c69173e5de6acfae34dd",
- "_shrinkwrap": null,
- "_spec": "camelcase@^4.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar`",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "name": "camelcase",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "4.1.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/readme.md
deleted file mode 100644
index 0610dc627d..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/readme.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase)
-
-> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar`
-
-
-## Install
-
-```
-$ npm install --save camelcase
-```
-
-
-## Usage
-
-```js
-const camelCase = require('camelcase');
-
-camelCase('foo-bar');
-//=> 'fooBar'
-
-camelCase('foo_bar');
-//=> 'fooBar'
-
-camelCase('Foo-Bar');
-//=> 'fooBar'
-
-camelCase('--foo.bar');
-//=> 'fooBar'
-
-camelCase('__foo__bar__');
-//=> 'fooBar'
-
-camelCase('foo bar');
-//=> 'fooBar'
-
-console.log(process.argv[3]);
-//=> '--foo-bar'
-camelCase(process.argv[3]);
-//=> 'fooBar'
-
-camelCase('foo', 'bar');
-//=> 'fooBar'
-
-camelCase('__foo__', '--bar');
-//=> 'fooBar'
-```
-
-
-## Related
-
-- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module
-- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)