aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize')
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/index.js13
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/license21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/package.json43
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/readme.md48
4 files changed, 125 insertions, 0 deletions
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/index.js
new file mode 100644
index 0000000000..8d5bab7e46
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/index.js
@@ -0,0 +1,13 @@
+'use strict';
+module.exports = function (str, sep) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ sep = typeof sep === 'undefined' ? '_' : sep;
+
+ return str
+ .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2')
+ .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2')
+ .toLowerCase();
+};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/license
@@ -0,0 +1,21 @@
+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/decamelize/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/package.json
new file mode 100644
index 0000000000..c815395d58
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/package.json
@@ -0,0 +1,43 @@
+{
+ "_from": "decamelize@^1.1.1",
+ "_id": "decamelize@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+ "_location": "/libnpx/yargs/decamelize",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "decamelize@^1.1.1",
+ "name": "decamelize",
+ "escapedName": "decamelize",
+ "rawSpec": "^1.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.1"
+ },
+ "_requiredBy": [
+ "/libnpx/yargs"
+ ],
+ "_resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "_shasum": "f6534d15148269b20352e7bee26f501f9a191290",
+ "_shrinkwrap": null,
+ "_spec": "decamelize@^1.1.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
+ "bin": null,
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "> Convert a camelized string into a lowercased one with a custom separator<br> > Example: `unicornRainbow` → `unicorn_rainbow`",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "name": "decamelize",
+ "optionalDependencies": {},
+ "peerDependencies": {},
+ "scripts": {},
+ "version": "1.2.0"
+}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/readme.md
new file mode 100644
index 0000000000..624c7ee5ed
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/decamelize/readme.md
@@ -0,0 +1,48 @@
+# decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize)
+
+> Convert a camelized string into a lowercased one with a custom separator<br>
+> Example: `unicornRainbow` → `unicorn_rainbow`
+
+
+## Install
+
+```
+$ npm install --save decamelize
+```
+
+
+## Usage
+
+```js
+const decamelize = require('decamelize');
+
+decamelize('unicornRainbow');
+//=> 'unicorn_rainbow'
+
+decamelize('unicornRainbow', '-');
+//=> 'unicorn-rainbow'
+```
+
+
+## API
+
+### decamelize(input, [separator])
+
+#### input
+
+Type: `string`
+
+#### separator
+
+Type: `string`<br>
+Default: `_`
+
+
+## Related
+
+See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)