diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-03 01:33:53 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-03 01:33:53 +0100 |
commit | d1291f67551c58168af43698a359cb5ddfd266b0 (patch) | |
tree | 55a13ed29fe1915e3f42f1b1b7038dafa2e975a7 /node_modules/glob-base | |
parent | d0a0695fb5d34996850723f7d4b1b59c3df909c2 (diff) | |
download | wallet-core-d1291f67551c58168af43698a359cb5ddfd266b0.tar.xz |
node_modules
Diffstat (limited to 'node_modules/glob-base')
8 files changed, 166 insertions, 87 deletions
diff --git a/node_modules/glob-base/node_modules/glob-parent/.npmignore b/node_modules/glob-base/node_modules/glob-parent/.npmignore new file mode 100644 index 000000000..33e391f0e --- /dev/null +++ b/node_modules/glob-base/node_modules/glob-parent/.npmignore @@ -0,0 +1,4 @@ +node_modules +.DS_Store +npm-debug.log +coverage diff --git a/node_modules/glob-base/node_modules/glob-parent/.travis.yml b/node_modules/glob-base/node_modules/glob-parent/.travis.yml new file mode 100644 index 000000000..18fc42f69 --- /dev/null +++ b/node_modules/glob-base/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-base/node_modules/glob-parent/LICENSE b/node_modules/glob-base/node_modules/glob-parent/LICENSE new file mode 100644 index 000000000..734076d8a --- /dev/null +++ b/node_modules/glob-base/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-base/node_modules/glob-parent/README.md b/node_modules/glob-base/node_modules/glob-parent/README.md new file mode 100644 index 000000000..ff5310d3b --- /dev/null +++ b/node_modules/glob-base/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-base/node_modules/glob-parent/index.js b/node_modules/glob-base/node_modules/glob-parent/index.js new file mode 100644 index 000000000..61615f1ac --- /dev/null +++ b/node_modules/glob-base/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-base/node_modules/glob-parent/package.json b/node_modules/glob-base/node_modules/glob-parent/package.json new file mode 100644 index 000000000..5499007fb --- /dev/null +++ b/node_modules/glob-base/node_modules/glob-parent/package.json @@ -0,0 +1,35 @@ +{ + "name": "glob-parent", + "version": "2.0.0", + "description": "Strips glob magic from a string to provide the parent path", + "main": "index.js", + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "repository": { + "type": "git", + "url": "https://github.com/es128/glob-parent" + }, + "keywords": [ + "glob", + "parent", + "strip", + "path", + "directory", + "base" + ], + "author": "Elan Shanker", + "license": "ISC", + "bugs": { + "url": "https://github.com/es128/glob-parent/issues" + }, + "homepage": "https://github.com/es128/glob-parent", + "dependencies": { + "is-glob": "^2.0.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.5", + "mocha": "^2.1.0" + } +} diff --git a/node_modules/glob-base/node_modules/glob-parent/test.js b/node_modules/glob-base/node_modules/glob-parent/test.js new file mode 100644 index 000000000..01156d2ff --- /dev/null +++ b/node_modules/glob-base/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'); + }); +}); diff --git a/node_modules/glob-base/package.json b/node_modules/glob-base/package.json index e0a7ed4e1..8cb2dbf5e 100644 --- a/node_modules/glob-base/package.json +++ b/node_modules/glob-base/package.json @@ -1,75 +1,41 @@ { - "_args": [ - [ - { - "raw": "glob-base@^0.3.0", - "scope": null, - "escapedName": "glob-base", - "name": "glob-base", - "rawSpec": "^0.3.0", - "spec": ">=0.3.0 <0.4.0", - "type": "range" - }, - "/home/dold/repos/taler/wallet-webex/node_modules/parse-glob" - ] - ], - "_from": "glob-base@>=0.3.0 <0.4.0", - "_id": "glob-base@0.3.0", - "_inCache": true, - "_location": "/glob-base", - "_nodeVersion": "0.12.7", - "_npmUser": { - "name": "es128", - "email": "elan.shanker+npm@gmail.com" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "raw": "glob-base@^0.3.0", - "scope": null, - "escapedName": "glob-base", - "name": "glob-base", - "rawSpec": "^0.3.0", - "spec": ">=0.3.0 <0.4.0", - "type": "range" - }, - "_requiredBy": [ - "/parse-glob" - ], - "_resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "_shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", - "_shrinkwrap": null, - "_spec": "glob-base@^0.3.0", - "_where": "/home/dold/repos/taler/wallet-webex/node_modules/parse-glob", + "name": "glob-base", + "description": "Returns an object with the (non-glob) base path and the actual pattern.", + "version": "0.3.0", + "homepage": "https://github.com/jonschlinkert/glob-base", "author": { "name": "Jon Schlinkert", "url": "https://github.com/jonschlinkert" }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/glob-base.git" + }, "bugs": { "url": "https://github.com/jonschlinkert/glob-base/issues" }, + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/glob-base/blob/master/LICENSE" + }, + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, "dependencies": { "glob-parent": "^2.0.0", "is-glob": "^2.0.0" }, - "description": "Returns an object with the (non-glob) base path and the actual pattern.", "devDependencies": { "mocha": "*", "should": "^5.1.0" }, - "directories": {}, - "dist": { - "shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", - "tarball": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "adbc0ab07ec8a85f76ffd1b54dd41cdb9d1d0b83", - "homepage": "https://github.com/jonschlinkert/glob-base", "keywords": [ "base", "directory", @@ -82,35 +48,5 @@ "regex", "regular", "root" - ], - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/glob-base/blob/master/LICENSE" - }, - "main": "index.js", - "maintainers": [ - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - }, - { - "name": "es128", - "email": "elan.shanker+npm@gmail.com" - }, - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "glob-base", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/glob-base.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.3.0" + ] } |