aboutsummaryrefslogtreecommitdiff
path: root/node_modules/glob-parent
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
commitabd94a7f5a50f43c797a11b53549ae48fff667c3 (patch)
treeab8ed457f65cdd72e13e0571d2975729428f1551 /node_modules/glob-parent
parenta0247c6a3fd6a09a41a7e35a3441324c4dcb58be (diff)
downloadwallet-core-abd94a7f5a50f43c797a11b53549ae48fff667c3.tar.xz
add node_modules to address #4364
Diffstat (limited to 'node_modules/glob-parent')
-rw-r--r--node_modules/glob-parent/.npmignore4
-rw-r--r--node_modules/glob-parent/.travis.yml8
-rw-r--r--node_modules/glob-parent/LICENSE15
-rw-r--r--node_modules/glob-parent/README.md43
-rw-r--r--node_modules/glob-parent/index.js10
-rw-r--r--node_modules/glob-parent/package.json93
-rw-r--r--node_modules/glob-parent/test.js28
7 files changed, 201 insertions, 0 deletions
diff --git a/node_modules/glob-parent/.npmignore b/node_modules/glob-parent/.npmignore
new file mode 100644
index 000000000..33e391f0e
--- /dev/null
+++ b/node_modules/glob-parent/.npmignore
@@ -0,0 +1,4 @@
+node_modules
+.DS_Store
+npm-debug.log
+coverage
diff --git a/node_modules/glob-parent/.travis.yml b/node_modules/glob-parent/.travis.yml
new file mode 100644
index 000000000..18fc42f69
--- /dev/null
+++ b/node_modules/glob-parent/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "4"
+ - "iojs-v3"
+ - "iojs-v2"
+ - "iojs-v1"
+ - "0.12"
+ - "0.10"
diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE
new file mode 100644
index 000000000..734076d8a
--- /dev/null
+++ b/node_modules/glob-parent/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) 2015 Elan Shanker
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md
new file mode 100644
index 000000000..ff5310d3b
--- /dev/null
+++ b/node_modules/glob-parent/README.md
@@ -0,0 +1,43 @@
+glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master)
+======
+Javascript module to extract the non-magic parent path from a glob string.
+
+[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/)
+[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/)
+
+Usage
+-----
+```sh
+npm install glob-parent --save
+```
+
+```js
+var globParent = require('glob-parent');
+
+globParent('path/to/*.js'); // 'path/to'
+globParent('/root/path/to/*.js'); // '/root/path/to'
+globParent('/*.js'); // '/'
+globParent('*.js'); // '.'
+globParent('**/*.js'); // '.'
+globParent('path/{to,from}'); // 'path'
+globParent('path/!(to|from)'); // 'path'
+globParent('path/?(to|from)'); // 'path'
+globParent('path/+(to|from)'); // 'path'
+globParent('path/*(to|from)'); // 'path'
+globParent('path/@(to|from)'); // 'path'
+globParent('path/**/*'); // 'path'
+
+// if provided a non-glob path, returns the nearest dir
+globParent('path/foo/bar.js'); // 'path/foo'
+globParent('path/foo/'); // 'path/foo'
+globParent('path/foo'); // 'path' (see issue #3 for details)
+
+```
+
+Change Log
+----------
+[See release notes page on GitHub](https://github.com/es128/glob-parent/releases)
+
+License
+-------
+[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE)
diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js
new file mode 100644
index 000000000..61615f1ac
--- /dev/null
+++ b/node_modules/glob-parent/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var path = require('path');
+var isglob = require('is-glob');
+
+module.exports = function globParent(str) {
+ str += 'a'; // preserves full path in case of trailing path separator
+ do {str = path.dirname(str)} while (isglob(str));
+ return str;
+};
diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json
new file mode 100644
index 000000000..ac6800e6f
--- /dev/null
+++ b/node_modules/glob-parent/package.json
@@ -0,0 +1,93 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "glob-parent@^2.0.0",
+ "scope": null,
+ "escapedName": "glob-parent",
+ "name": "glob-parent",
+ "rawSpec": "^2.0.0",
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/glob-base"
+ ]
+ ],
+ "_from": "glob-parent@>=2.0.0 <3.0.0",
+ "_id": "glob-parent@2.0.0",
+ "_inCache": true,
+ "_location": "/glob-parent",
+ "_nodeVersion": "3.0.0",
+ "_npmUser": {
+ "name": "es128",
+ "email": "elan.shanker+npm@gmail.com"
+ },
+ "_npmVersion": "2.13.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "glob-parent@^2.0.0",
+ "scope": null,
+ "escapedName": "glob-parent",
+ "name": "glob-parent",
+ "rawSpec": "^2.0.0",
+ "spec": ">=2.0.0 <3.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/glob-base"
+ ],
+ "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
+ "_shasum": "81383d72db054fcccf5336daa902f182f6edbb28",
+ "_shrinkwrap": null,
+ "_spec": "glob-parent@^2.0.0",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/glob-base",
+ "author": {
+ "name": "Elan Shanker"
+ },
+ "bugs": {
+ "url": "https://github.com/es128/glob-parent/issues"
+ },
+ "dependencies": {
+ "is-glob": "^2.0.0"
+ },
+ "description": "Strips glob magic from a string to provide the parent path",
+ "devDependencies": {
+ "coveralls": "^2.11.2",
+ "istanbul": "^0.3.5",
+ "mocha": "^2.1.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "81383d72db054fcccf5336daa902f182f6edbb28",
+ "tarball": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz"
+ },
+ "gitHead": "a956910c7ccb5eafd1b3fe900ceb6335cc5b6d3d",
+ "homepage": "https://github.com/es128/glob-parent",
+ "keywords": [
+ "glob",
+ "parent",
+ "strip",
+ "path",
+ "directory",
+ "base"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "es128",
+ "email": "elan.shanker+npm@gmail.com"
+ }
+ ],
+ "name": "glob-parent",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/es128/glob-parent.git"
+ },
+ "scripts": {
+ "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"
+ },
+ "version": "2.0.0"
+}
diff --git a/node_modules/glob-parent/test.js b/node_modules/glob-parent/test.js
new file mode 100644
index 000000000..01156d2ff
--- /dev/null
+++ b/node_modules/glob-parent/test.js
@@ -0,0 +1,28 @@
+'use strict';
+
+var gp = require('./');
+var assert = require('assert');
+
+describe('glob-parent', function() {
+ it('should strip glob magic to return parent path', function() {
+ assert.equal(gp('path/to/*.js'), 'path/to');
+ assert.equal(gp('/root/path/to/*.js'), '/root/path/to');
+ assert.equal(gp('/*.js'), '/');
+ assert.equal(gp('*.js'), '.');
+ assert.equal(gp('**/*.js'), '.');
+ assert.equal(gp('path/{to,from}'), 'path');
+ assert.equal(gp('path/!(to|from)'), 'path');
+ assert.equal(gp('path/?(to|from)'), 'path');
+ assert.equal(gp('path/+(to|from)'), 'path');
+ assert.equal(gp('path/*(to|from)'), 'path');
+ assert.equal(gp('path/@(to|from)'), 'path');
+ assert.equal(gp('path/**/*'), 'path');
+ assert.equal(gp('path/**/subdir/foo.*'), 'path');
+ });
+
+ it('should return parent dirname from non-glob paths', function() {
+ assert.equal(gp('path/foo/bar.js'), 'path/foo');
+ assert.equal(gp('path/foo/'), 'path/foo');
+ assert.equal(gp('path/foo'), 'path');
+ });
+});