mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-13 05:13:33 -06:00
Initial commit
This commit is contained in:
27
node_modules/multimatch/index.js
generated
vendored
Normal file
27
node_modules/multimatch/index.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
var minimatch = require('minimatch');
|
||||
var arrayUnion = require('array-union');
|
||||
var arrayDiffer = require('array-differ');
|
||||
var arrify = require('arrify');
|
||||
|
||||
module.exports = function (list, patterns, options) {
|
||||
list = arrify(list);
|
||||
patterns = arrify(patterns);
|
||||
|
||||
if (list.length === 0 || patterns.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
|
||||
return patterns.reduce(function (ret, pattern) {
|
||||
var process = arrayUnion;
|
||||
|
||||
if (pattern[0] === '!') {
|
||||
pattern = pattern.slice(1);
|
||||
process = arrayDiffer;
|
||||
}
|
||||
|
||||
return process(ret, minimatch.match(list, pattern, options));
|
||||
}, []);
|
||||
};
|
21
node_modules/multimatch/license
generated
vendored
Normal file
21
node_modules/multimatch/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus, Jon Schlinkert, contributors.
|
||||
|
||||
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.
|
99
node_modules/multimatch/package.json
generated
vendored
Normal file
99
node_modules/multimatch/package.json
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"multimatch@^2.0.0",
|
||||
"/Users/pmarsceill/_projects/just-the-docs/node_modules/doiuse"
|
||||
]
|
||||
],
|
||||
"_from": "multimatch@>=2.0.0 <3.0.0",
|
||||
"_id": "multimatch@2.1.0",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/multimatch",
|
||||
"_nodeVersion": "4.2.1",
|
||||
"_npmUser": {
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"name": "sindresorhus"
|
||||
},
|
||||
"_npmVersion": "2.14.7",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "multimatch",
|
||||
"raw": "multimatch@^2.0.0",
|
||||
"rawSpec": "^2.0.0",
|
||||
"scope": null,
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/doiuse"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz",
|
||||
"_shasum": "9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "multimatch@^2.0.0",
|
||||
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/doiuse",
|
||||
"author": {
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"name": "Sindre Sorhus",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/multimatch/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"array-differ": "^1.0.0",
|
||||
"array-union": "^1.0.1",
|
||||
"arrify": "^1.0.0",
|
||||
"minimatch": "^3.0.0"
|
||||
},
|
||||
"description": "Extends minimatch.match() with support for multiple patterns",
|
||||
"devDependencies": {
|
||||
"chai": "^3.4.1",
|
||||
"mocha": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b",
|
||||
"tarball": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "5b56d1689ef475975682a514b8e1f863794af419",
|
||||
"homepage": "https://github.com/sindresorhus/multimatch",
|
||||
"keywords": [
|
||||
"expand",
|
||||
"find",
|
||||
"glob",
|
||||
"globbing",
|
||||
"globs",
|
||||
"match",
|
||||
"matcher",
|
||||
"minimatch",
|
||||
"pattern",
|
||||
"patterns",
|
||||
"wildcard"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "multimatch",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/multimatch.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.1.0"
|
||||
}
|
62
node_modules/multimatch/readme.md
generated
vendored
Normal file
62
node_modules/multimatch/readme.md
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
# multimatch [](https://travis-ci.org/sindresorhus/multimatch)
|
||||
|
||||
> Extends [`minimatch.match()`](https://github.com/isaacs/minimatch#minimatchmatchlist-pattern-options) with support for multiple patterns
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
|
||||
$ npm install --save multimatch
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var multimatch = require('multimatch');
|
||||
|
||||
multimatch(['unicorn', 'cake', 'rainbows'], ['*', '!cake']);
|
||||
//=> ['unicorn', 'rainbows']
|
||||
```
|
||||
|
||||
See the [tests](https://github.com/sindresorhus/multimatch/blob/master/test.js) for more usage examples and expected matches.
|
||||
|
||||
|
||||
## API
|
||||
|
||||
Same as [`minimatch.match()`](https://github.com/isaacs/minimatch#minimatchmatchlist-pattern-options) except for `pattern` also accepting an array.
|
||||
|
||||
```js
|
||||
var results = multimatch(paths, patterns);
|
||||
```
|
||||
|
||||
The return value is an array of matching paths.
|
||||
|
||||
|
||||
## How multiple patterns work
|
||||
|
||||
Positive patterns (e.g. `foo` or `*`) add to the results, while negative patterns (e.g. `!foo`) subtract from the results.
|
||||
|
||||
Therefore a lone negation (e.g. `['!foo']`) will never match anything – use `['*', '!foo']` instead.
|
||||
|
||||
|
||||
## Globbing patterns
|
||||
|
||||
Just a quick overview.
|
||||
|
||||
- `*` matches any number of characters, but not `/`
|
||||
- `?` matches a single character, but not `/`
|
||||
- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part
|
||||
- `{}` allows for a comma-separated list of "or" expressions
|
||||
- `!` at the beginning of a pattern will negate the match
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
See [globby](https://github.com/sindresorhus/globby) if you need to match against the filesystem instead of a list.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com), [Jon Schlinkert](https://github.com/jonschlinkert)
|
Reference in New Issue
Block a user