summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/rc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/rc')
-rw-r--r--deps/npm/node_modules/rc/LICENSE.BSD8
-rw-r--r--deps/npm/node_modules/rc/LICENSE.MIT30
-rw-r--r--deps/npm/node_modules/rc/README.md4
-rw-r--r--deps/npm/node_modules/rc/browser.js2
-rw-r--r--deps/npm/node_modules/rc/lib/utils.js2
-rw-r--r--deps/npm/node_modules/rc/node_modules/minimist/index.js33
-rw-r--r--deps/npm/node_modules/rc/node_modules/minimist/test/all_bool.js8
-rw-r--r--deps/npm/node_modules/rc/node_modules/minimist/test/bool.js16
-rw-r--r--deps/npm/node_modules/rc/node_modules/minimist/test/kv_short.js4
-rw-r--r--deps/npm/node_modules/rc/node_modules/minimist/test/parse.js12
-rw-r--r--deps/npm/node_modules/rc/node_modules/minimist/test/parse_modified.js2
-rw-r--r--deps/npm/node_modules/rc/node_modules/minimist/test/short.js4
-rw-r--r--deps/npm/node_modules/rc/test/ini.js1
13 files changed, 65 insertions, 61 deletions
diff --git a/deps/npm/node_modules/rc/LICENSE.BSD b/deps/npm/node_modules/rc/LICENSE.BSD
index c6f2e5490c..96bb796aa5 100644
--- a/deps/npm/node_modules/rc/LICENSE.BSD
+++ b/deps/npm/node_modules/rc/LICENSE.BSD
@@ -2,13 +2,13 @@ Copyright (c) 2013, Dominic Tarr
All rights reserved.
Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
+modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
+ list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
+ and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -22,5 +22,5 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
-of the authors and should not be interpreted as representing official policies,
+of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
diff --git a/deps/npm/node_modules/rc/LICENSE.MIT b/deps/npm/node_modules/rc/LICENSE.MIT
index 49e7da41fe..6eafbd734a 100644
--- a/deps/npm/node_modules/rc/LICENSE.MIT
+++ b/deps/npm/node_modules/rc/LICENSE.MIT
@@ -2,23 +2,23 @@ The MIT License
Copyright (c) 2011 Dominic Tarr
-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,
+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
+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
+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/rc/README.md b/deps/npm/node_modules/rc/README.md
index 0a411d3629..e6522e2678 100644
--- a/deps/npm/node_modules/rc/README.md
+++ b/deps/npm/node_modules/rc/README.md
@@ -191,7 +191,7 @@ Here is the expected output from various commands:
}
```
*Now the `port` comes from the `config.json` file specified (overriding the value from `.myapprc`), and `foo` value is overriden by command-line despite also being specified in the `config.json` file.*
-
+
## Advanced Usage
@@ -219,7 +219,7 @@ such as strict, valid JSON only.
## Note on Performance
-`rc` is running `fs.statSync`-- so make sure you don't use it in a hot code path (e.g. a request handler)
+`rc` is running `fs.statSync`-- so make sure you don't use it in a hot code path (e.g. a request handler)
## License
diff --git a/deps/npm/node_modules/rc/browser.js b/deps/npm/node_modules/rc/browser.js
index 9ea1a3e395..8c230c5cd2 100644
--- a/deps/npm/node_modules/rc/browser.js
+++ b/deps/npm/node_modules/rc/browser.js
@@ -1,5 +1,5 @@
-// when this is loaded into the browser,
+// when this is loaded into the browser,
// just use the defaults...
module.exports = function (name, defaults) {
diff --git a/deps/npm/node_modules/rc/lib/utils.js b/deps/npm/node_modules/rc/lib/utils.js
index 52c201f7e1..8b3beffa32 100644
--- a/deps/npm/node_modules/rc/lib/utils.js
+++ b/deps/npm/node_modules/rc/lib/utils.js
@@ -100,3 +100,5 @@ var find = exports.find = function () {
}
return find(process.cwd(), rel)
}
+
+
diff --git a/deps/npm/node_modules/rc/node_modules/minimist/index.js b/deps/npm/node_modules/rc/node_modules/minimist/index.js
index e06783fb1c..6a0559d581 100644
--- a/deps/npm/node_modules/rc/node_modules/minimist/index.js
+++ b/deps/npm/node_modules/rc/node_modules/minimist/index.js
@@ -1,6 +1,6 @@
module.exports = function (args, opts) {
if (!opts) opts = {};
-
+
var flags = { bools : {}, strings : {}, unknownFn: null };
if (typeof opts['unknown'] === 'function') {
@@ -14,7 +14,7 @@ module.exports = function (args, opts) {
flags.bools[key] = true;
});
}
-
+
var aliases = {};
Object.keys(opts.alias || {}).forEach(function (key) {
aliases[key] = [].concat(opts.alias[key]);
@@ -33,12 +33,12 @@ module.exports = function (args, opts) {
});
var defaults = opts['default'] || {};
-
+
var argv = { _ : [] };
Object.keys(flags.bools).forEach(function (key) {
setArg(key, defaults[key] === undefined ? false : defaults[key]);
});
-
+
var notFlags = [];
if (args.indexOf('--') !== -1) {
@@ -60,7 +60,7 @@ module.exports = function (args, opts) {
? Number(val) : val
;
setKey(argv, key.split('.'), value);
-
+
(aliases[key] || []).forEach(function (x) {
setKey(argv, x.split('.'), value);
});
@@ -84,7 +84,7 @@ module.exports = function (args, opts) {
o[key] = [ o[key], value ];
}
}
-
+
function aliasIsBoolean(key) {
return aliases[key].some(function (x) {
return flags.bools[x];
@@ -93,7 +93,7 @@ module.exports = function (args, opts) {
for (var i = 0; i < args.length; i++) {
var arg = args[i];
-
+
if (/^--.+=/.test(arg)) {
// Using [\s\S] instead of . because js doesn't support the
// 'dotall' regex modifier. See:
@@ -130,29 +130,29 @@ module.exports = function (args, opts) {
}
else if (/^-[^-]+/.test(arg)) {
var letters = arg.slice(1,-1).split('');
-
+
var broken = false;
for (var j = 0; j < letters.length; j++) {
var next = arg.slice(j+2);
-
+
if (next === '-') {
setArg(letters[j], next, arg)
continue;
}
-
+
if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
setArg(letters[j], next.split('=')[1], arg);
broken = true;
break;
}
-
+
if (/[A-Za-z]/.test(letters[j])
&& /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
setArg(letters[j], next, arg);
broken = true;
break;
}
-
+
if (letters[j+1] && letters[j+1].match(/\W/)) {
setArg(letters[j], arg.slice(j+2), arg);
broken = true;
@@ -162,7 +162,7 @@ module.exports = function (args, opts) {
setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
}
}
-
+
var key = arg.slice(-1)[0];
if (!broken && key !== '-') {
if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
@@ -192,17 +192,17 @@ module.exports = function (args, opts) {
}
}
}
-
+
Object.keys(defaults).forEach(function (key) {
if (!hasKey(argv, key.split('.'))) {
setKey(argv, key.split('.'), defaults[key]);
-
+
(aliases[key] || []).forEach(function (x) {
setKey(argv, x.split('.'), defaults[key]);
});
}
});
-
+
if (opts['--']) {
argv['--'] = new Array();
notFlags.forEach(function(key) {
@@ -233,3 +233,4 @@ function isNumber (x) {
if (/^0x[0-9a-f]+$/i.test(x)) return true;
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
}
+
diff --git a/deps/npm/node_modules/rc/node_modules/minimist/test/all_bool.js b/deps/npm/node_modules/rc/node_modules/minimist/test/all_bool.js
index 25df1654bc..ac835483d9 100644
--- a/deps/npm/node_modules/rc/node_modules/minimist/test/all_bool.js
+++ b/deps/npm/node_modules/rc/node_modules/minimist/test/all_bool.js
@@ -5,12 +5,12 @@ test('flag boolean true (default all --args to boolean)', function (t) {
var argv = parse(['moo', '--honk', 'cow'], {
boolean: true
});
-
+
t.deepEqual(argv, {
honk: true,
_: ['moo', 'cow']
});
-
+
t.deepEqual(typeof argv.honk, 'boolean');
t.end();
});
@@ -19,14 +19,14 @@ test('flag boolean true only affects double hyphen arguments without equals sign
var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], {
boolean: true
});
-
+
t.deepEqual(argv, {
honk: true,
tacos: 'good',
p: 55,
_: ['moo', 'cow']
});
-
+
t.deepEqual(typeof argv.honk, 'boolean');
t.end();
});
diff --git a/deps/npm/node_modules/rc/node_modules/minimist/test/bool.js b/deps/npm/node_modules/rc/node_modules/minimist/test/bool.js
index 6e793e4b64..14b0717cef 100644
--- a/deps/npm/node_modules/rc/node_modules/minimist/test/bool.js
+++ b/deps/npm/node_modules/rc/node_modules/minimist/test/bool.js
@@ -6,13 +6,13 @@ test('flag boolean default false', function (t) {
boolean: ['t', 'verbose'],
default: { verbose: false, t: false }
});
-
+
t.deepEqual(argv, {
verbose: false,
t: false,
_: ['moo']
});
-
+
t.deepEqual(typeof argv.verbose, 'boolean');
t.deepEqual(typeof argv.t, 'boolean');
t.end();
@@ -23,14 +23,14 @@ test('boolean groups', function (t) {
var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
boolean: ['x','y','z']
});
-
+
t.deepEqual(argv, {
x : true,
y : false,
z : true,
_ : [ 'one', 'two', 'three' ]
});
-
+
t.deepEqual(typeof argv.x, 'boolean');
t.deepEqual(typeof argv.y, 'boolean');
t.deepEqual(typeof argv.z, 'boolean');
@@ -55,9 +55,9 @@ test('boolean and alias with chainable api', function (t) {
h: true,
'_': [ 'derp' ]
};
-
+
t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
+ t.same(propertyArgv, expected);
t.end();
});
@@ -119,7 +119,7 @@ test('boolean and alias using explicit true', function (t) {
};
t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
+ t.same(propertyArgv, expected);
t.end();
});
@@ -135,7 +135,7 @@ test('boolean and --x=true', function(t) {
parsed = parse(['--boool', '--other=false'], {
boolean: 'boool'
});
-
+
t.same(parsed.boool, true);
t.same(parsed.other, 'false');
t.end();
diff --git a/deps/npm/node_modules/rc/node_modules/minimist/test/kv_short.js b/deps/npm/node_modules/rc/node_modules/minimist/test/kv_short.js
index ae880be466..f813b30505 100644
--- a/deps/npm/node_modules/rc/node_modules/minimist/test/kv_short.js
+++ b/deps/npm/node_modules/rc/node_modules/minimist/test/kv_short.js
@@ -3,14 +3,14 @@ var test = require('tape');
test('short -k=v' , function (t) {
t.plan(1);
-
+
var argv = parse([ '-b=123' ]);
t.deepEqual(argv, { b: 123, _: [] });
});
test('multi short -k=v' , function (t) {
t.plan(1);
-
+
var argv = parse([ '-a=whatever', '-b=robots' ]);
t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] });
});
diff --git a/deps/npm/node_modules/rc/node_modules/minimist/test/parse.js b/deps/npm/node_modules/rc/node_modules/minimist/test/parse.js
index 58f24572c4..7b4a2a17c0 100644
--- a/deps/npm/node_modules/rc/node_modules/minimist/test/parse.js
+++ b/deps/npm/node_modules/rc/node_modules/minimist/test/parse.js
@@ -14,7 +14,7 @@ test('parse args', function (t) {
);
t.end();
});
-
+
test('comprehensive', function (t) {
t.deepEqual(
parse([
@@ -54,13 +54,13 @@ test('flag boolean value', function (t) {
boolean: [ 't', 'verbose' ],
default: { verbose: true }
});
-
+
t.deepEqual(argv, {
verbose: false,
t: true,
_: ['moo']
});
-
+
t.deepEqual(typeof argv.verbose, 'boolean');
t.deepEqual(typeof argv.t, 'boolean');
t.end();
@@ -69,7 +69,7 @@ test('flag boolean value', function (t) {
test('newlines in params' , function (t) {
var args = parse([ '-s', "X\nX" ])
t.deepEqual(args, { _ : [], s : "X\nX" });
-
+
// reproduce in bash:
// VALUE="new
// line"
@@ -83,7 +83,7 @@ test('strings' , function (t) {
var s = parse([ '-s', '0001234' ], { string: 's' }).s;
t.equal(s, '0001234');
t.equal(typeof s, 'string');
-
+
var x = parse([ '-x', '56' ], { string: 'x' }).x;
t.equal(x, '56');
t.equal(typeof x, 'string');
@@ -183,7 +183,7 @@ test('nested dotted objects', function (t) {
'--foo.quux.quibble', '5', '--foo.quux.o_O',
'--beep.boop'
]);
-
+
t.same(argv.foo, {
bar : 3,
baz : 4,
diff --git a/deps/npm/node_modules/rc/node_modules/minimist/test/parse_modified.js b/deps/npm/node_modules/rc/node_modules/minimist/test/parse_modified.js
index a22248532f..ab620dc5e4 100644
--- a/deps/npm/node_modules/rc/node_modules/minimist/test/parse_modified.js
+++ b/deps/npm/node_modules/rc/node_modules/minimist/test/parse_modified.js
@@ -3,7 +3,7 @@ var test = require('tape');
test('parse with modifier functions' , function (t) {
t.plan(1);
-
+
var argv = parse([ '-b', '123' ], { boolean: 'b' });
t.deepEqual(argv, { b: true, _: [123] });
});
diff --git a/deps/npm/node_modules/rc/node_modules/minimist/test/short.js b/deps/npm/node_modules/rc/node_modules/minimist/test/short.js
index ac18880f1e..d513a1c252 100644
--- a/deps/npm/node_modules/rc/node_modules/minimist/test/short.js
+++ b/deps/npm/node_modules/rc/node_modules/minimist/test/short.js
@@ -43,7 +43,7 @@ test('short', function (t) {
);
t.end();
});
-
+
test('mixed short bool and capture', function (t) {
t.same(
parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
@@ -54,7 +54,7 @@ test('mixed short bool and capture', function (t) {
);
t.end();
});
-
+
test('short and long', function (t) {
t.deepEqual(
parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
diff --git a/deps/npm/node_modules/rc/test/ini.js b/deps/npm/node_modules/rc/test/ini.js
index cdb1990062..e6857f8b38 100644
--- a/deps/npm/node_modules/rc/test/ini.js
+++ b/deps/npm/node_modules/rc/test/ini.js
@@ -13,3 +13,4 @@ function test(obj) {
test({hello: true})
+