Demo for query storing
Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/globby/gitignore.js b/node_modules/globby/gitignore.js
new file mode 100644
index 0000000..c491fdc
--- /dev/null
+++ b/node_modules/globby/gitignore.js
@@ -0,0 +1,95 @@
+'use strict';
+const fs = require('fs');
+const path = require('path');
+const fastGlob = require('fast-glob');
+const gitIgnore = require('ignore');
+const pify = require('pify');
+const slash = require('slash');
+
+const DEFAULT_IGNORE = [
+ '**/node_modules/**',
+ '**/bower_components/**',
+ '**/flow-typed/**',
+ '**/coverage/**',
+ '**/.git'
+];
+
+const readFileP = pify(fs.readFile);
+
+const mapGitIgnorePatternTo = base => ignore => {
+ if (ignore.startsWith('!')) {
+ return '!' + path.posix.join(base, ignore.substr(1));
+ }
+
+ return path.posix.join(base, ignore);
+};
+
+const parseGitIgnore = (content, opts) => {
+ const base = slash(path.relative(opts.cwd, path.dirname(opts.fileName)));
+
+ return content
+ .split(/\r?\n/)
+ .filter(Boolean)
+ .filter(l => l.charAt(0) !== '#')
+ .map(mapGitIgnorePatternTo(base));
+};
+
+const reduceIgnore = files => {
+ return files.reduce((ignores, file) => {
+ ignores.add(parseGitIgnore(file.content, {
+ cwd: file.cwd,
+ fileName: file.filePath
+ }));
+ return ignores;
+ }, gitIgnore());
+};
+
+const getIsIgnoredPredecate = (ignores, cwd) => {
+ return p => ignores.ignores(slash(path.relative(cwd, p)));
+};
+
+const getFile = (file, cwd) => {
+ const filePath = path.join(cwd, file);
+ return readFileP(filePath, 'utf8')
+ .then(content => ({
+ content,
+ cwd,
+ filePath
+ }));
+};
+
+const getFileSync = (file, cwd) => {
+ const filePath = path.join(cwd, file);
+ const content = fs.readFileSync(filePath, 'utf8');
+
+ return {
+ content,
+ cwd,
+ filePath
+ };
+};
+
+const normalizeOpts = opts => {
+ opts = opts || {};
+ const ignore = opts.ignore || [];
+ const cwd = opts.cwd || process.cwd();
+ return {ignore, cwd};
+};
+
+module.exports = o => {
+ const opts = normalizeOpts(o);
+
+ return fastGlob('**/.gitignore', {ignore: DEFAULT_IGNORE.concat(opts.ignore), cwd: opts.cwd})
+ .then(paths => Promise.all(paths.map(file => getFile(file, opts.cwd))))
+ .then(files => reduceIgnore(files))
+ .then(ignores => getIsIgnoredPredecate(ignores, opts.cwd));
+};
+
+module.exports.sync = o => {
+ const opts = normalizeOpts(o);
+
+ const paths = fastGlob.sync('**/.gitignore', {ignore: DEFAULT_IGNORE.concat(opts.ignore), cwd: opts.cwd});
+ const files = paths.map(file => getFileSync(file, opts.cwd));
+ const ignores = reduceIgnore(files);
+ return getIsIgnoredPredecate(ignores, opts.cwd);
+};
diff --git a/node_modules/globby/index.js b/node_modules/globby/index.js
new file mode 100644
index 0000000..22bb640
--- /dev/null
+++ b/node_modules/globby/index.js
@@ -0,0 +1,128 @@
+'use strict';
+const arrayUnion = require('array-union');
+const glob = require('glob');
+const fastGlob = require('fast-glob');
+const dirGlob = require('dir-glob');
+const gitignore = require('./gitignore');
+
+const DEFAULT_FILTER = () => false;
+
+const isNegative = pattern => pattern[0] === '!';
+
+const assertPatternsInput = patterns => {
+ if (!patterns.every(x => typeof x === 'string')) {
+ throw new TypeError('Patterns must be a string or an array of strings');
+ }
+};
+
+const generateGlobTasks = (patterns, taskOpts) => {
+ patterns = [].concat(patterns);
+ assertPatternsInput(patterns);
+
+ const globTasks = [];
+
+ taskOpts = Object.assign({
+ ignore: [],
+ expandDirectories: true
+ }, taskOpts);
+
+ patterns.forEach((pattern, i) => {
+ if (isNegative(pattern)) {
+ return;
+ }
+
+ const ignore = patterns
+ .slice(i)
+ .filter(isNegative)
+ .map(pattern => pattern.slice(1));
+
+ const opts = Object.assign({}, taskOpts, {
+ ignore: taskOpts.ignore.concat(ignore)
+ });
+
+ globTasks.push({pattern, opts});
+ });
+
+ return globTasks;
+};
+
+const globDirs = (task, fn) => {
+ let opts = {cwd: task.opts.cwd};
+
+ if (Array.isArray(task.opts.expandDirectories)) {
+ opts = Object.assign(opts, {files: task.opts.expandDirectories});
+ } else if (typeof task.opts.expandDirectories === 'object') {
+ opts = Object.assign(opts, task.opts.expandDirectories);
+ }
+
+ return fn(task.pattern, opts);
+};
+
+const getPattern = (task, fn) => task.opts.expandDirectories ? globDirs(task, fn) : [task.pattern];
+
+module.exports = (patterns, opts) => {
+ let globTasks;
+
+ try {
+ globTasks = generateGlobTasks(patterns, opts);
+ } catch (err) {
+ return Promise.reject(err);
+ }
+
+ const getTasks = Promise.all(globTasks.map(task => Promise.resolve(getPattern(task, dirGlob))
+ .then(globs => Promise.all(globs.map(glob => ({
+ pattern: glob,
+ opts: task.opts
+ }))))
+ ))
+ .then(tasks => arrayUnion.apply(null, tasks));
+
+ const getFilter = () => {
+ return Promise.resolve(
+ opts && opts.gitignore ?
+ gitignore({cwd: opts.cwd, ignore: opts.ignore}) :
+ DEFAULT_FILTER
+ );
+ };
+
+ return getFilter()
+ .then(filter => {
+ return getTasks
+ .then(tasks => Promise.all(tasks.map(task => fastGlob(task.pattern, task.opts))))
+ .then(paths => arrayUnion.apply(null, paths))
+ .then(paths => paths.filter(p => !filter(p)));
+ });
+};
+
+module.exports.sync = (patterns, opts) => {
+ const globTasks = generateGlobTasks(patterns, opts);
+
+ const getFilter = () => {
+ return opts && opts.gitignore ?
+ gitignore.sync({cwd: opts.cwd, ignore: opts.ignore}) :
+ DEFAULT_FILTER;
+ };
+
+ const tasks = globTasks.reduce((tasks, task) => {
+ const newTask = getPattern(task, dirGlob.sync).map(glob => ({
+ pattern: glob,
+ opts: task.opts
+ }));
+ return tasks.concat(newTask);
+ }, []);
+
+ const filter = getFilter();
+
+ return tasks.reduce(
+ (matches, task) => arrayUnion(matches, fastGlob.sync(task.pattern, task.opts)),
+ []
+ ).filter(p => !filter(p));
+};
+
+module.exports.generateGlobTasks = generateGlobTasks;
+
+module.exports.hasMagic = (patterns, opts) => []
+ .concat(patterns)
+ .some(pattern => glob.hasMagic(pattern, opts));
+
+module.exports.gitignore = gitignore;
diff --git a/node_modules/globby/license b/node_modules/globby/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/globby/license
@@ -0,0 +1,9 @@
+MIT License
+
+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/node_modules/globby/node_modules/pify/index.js b/node_modules/globby/node_modules/pify/index.js
new file mode 100644
index 0000000..1dee43a
--- /dev/null
+++ b/node_modules/globby/node_modules/pify/index.js
@@ -0,0 +1,84 @@
+'use strict';
+
+const processFn = (fn, opts) => function () {
+ const P = opts.promiseModule;
+ const args = new Array(arguments.length);
+
+ for (let i = 0; i < arguments.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ return new P((resolve, reject) => {
+ if (opts.errorFirst) {
+ args.push(function (err, result) {
+ if (opts.multiArgs) {
+ const results = new Array(arguments.length - 1);
+
+ for (let i = 1; i < arguments.length; i++) {
+ results[i - 1] = arguments[i];
+ }
+
+ if (err) {
+ results.unshift(err);
+ reject(results);
+ } else {
+ resolve(results);
+ }
+ } else if (err) {
+ reject(err);
+ } else {
+ resolve(result);
+ }
+ });
+ } else {
+ args.push(function (result) {
+ if (opts.multiArgs) {
+ const results = new Array(arguments.length - 1);
+
+ for (let i = 0; i < arguments.length; i++) {
+ results[i] = arguments[i];
+ }
+
+ resolve(results);
+ } else {
+ resolve(result);
+ }
+ });
+ }
+
+ fn.apply(this, args);
+ });
+};
+
+module.exports = (obj, opts) => {
+ opts = Object.assign({
+ exclude: [/.+(Sync|Stream)$/],
+ errorFirst: true,
+ promiseModule: Promise
+ }, opts);
+
+ const filter = key => {
+ const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);
+ return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
+ };
+
+ let ret;
+ if (typeof obj === 'function') {
+ ret = function () {
+ if (opts.excludeMain) {
+ return obj.apply(this, arguments);
+ }
+
+ return processFn(obj, opts).apply(this, arguments);
+ };
+ } else {
+ ret = Object.create(Object.getPrototypeOf(obj));
+ }
+
+ for (const key in obj) { // eslint-disable-line guard-for-in
+ const x = obj[key];
+ ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x;
+ }
+
+ return ret;
+};
diff --git a/node_modules/globby/node_modules/pify/license b/node_modules/globby/node_modules/pify/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/globby/node_modules/pify/license
@@ -0,0 +1,9 @@
+MIT License
+
+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/node_modules/globby/node_modules/pify/package.json b/node_modules/globby/node_modules/pify/package.json
new file mode 100644
index 0000000..8ce175a
--- /dev/null
+++ b/node_modules/globby/node_modules/pify/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "pify@^3.0.0",
+ "_id": "pify@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "_location": "/globby/pify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pify@^3.0.0",
+ "name": "pify",
+ "escapedName": "pify",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/globby"
+ ],
+ "_resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "_shasum": "e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176",
+ "_spec": "pify@^3.0.0",
+ "_where": "C:\\Users\\marcr\\Desktop\\KorAp\\Git\\Kalamar\\node_modules\\globby",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/pify/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Promisify a callback-style function",
+ "devDependencies": {
+ "ava": "*",
+ "pinkie-promise": "^2.0.0",
+ "v8-natives": "^1.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/pify#readme",
+ "keywords": [
+ "promise",
+ "promises",
+ "promisify",
+ "all",
+ "denodify",
+ "denodeify",
+ "callback",
+ "cb",
+ "node",
+ "then",
+ "thenify",
+ "convert",
+ "transform",
+ "wrap",
+ "wrapper",
+ "bind",
+ "to",
+ "async",
+ "await",
+ "es2015",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "pify",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/pify.git"
+ },
+ "scripts": {
+ "optimization-test": "node --allow-natives-syntax optimization-test.js",
+ "test": "xo && ava && npm run optimization-test"
+ },
+ "version": "3.0.0"
+}
diff --git a/node_modules/globby/node_modules/pify/readme.md b/node_modules/globby/node_modules/pify/readme.md
new file mode 100644
index 0000000..376ca4e
--- /dev/null
+++ b/node_modules/globby/node_modules/pify/readme.md
@@ -0,0 +1,131 @@
+# pify [](https://travis-ci.org/sindresorhus/pify)
+
+> Promisify a callback-style function
+
+
+## Install
+
+```
+$ npm install --save pify
+```
+
+
+## Usage
+
+```js
+const fs = require('fs');
+const pify = require('pify');
+
+// Promisify a single function
+pify(fs.readFile)('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+
+// Promisify all methods in a module
+pify(fs).readFile('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+```
+
+
+## API
+
+### pify(input, [options])
+
+Returns a `Promise` wrapped version of the supplied function or module.
+
+#### input
+
+Type: `Function` `Object`
+
+Callback-style function or module whose methods you want to promisify.
+
+#### options
+
+##### multiArgs
+
+Type: `boolean`<br>
+Default: `false`
+
+By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error.
+
+```js
+const request = require('request');
+const pify = require('pify');
+
+pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
+ const [httpResponse, body] = result;
+});
+```
+
+##### include
+
+Type: `string[]` `RegExp[]`
+
+Methods in a module to promisify. Remaining methods will be left untouched.
+
+##### exclude
+
+Type: `string[]` `RegExp[]`<br>
+Default: `[/.+(Sync|Stream)$/]`
+
+Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
+
+##### excludeMain
+
+Type: `boolean`<br>
+Default: `false`
+
+If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module.
+
+```js
+const pify = require('pify');
+
+function fn() {
+ return true;
+}
+
+fn.method = (data, callback) => {
+ setImmediate(() => {
+ callback(null, data);
+ });
+};
+
+// Promisify methods but not `fn()`
+const promiseFn = pify(fn, {excludeMain: true});
+
+if (promiseFn()) {
+ promiseFn.method('hi').then(data => {
+ console.log(data);
+ });
+}
+```
+
+##### errorFirst
+
+Type: `boolean`<br>
+Default: `true`
+
+Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc.
+
+##### promiseModule
+
+Type: `Function`
+
+Custom promise module to use instead of the native one.
+
+Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
+
+
+## Related
+
+- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted
+- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/globby/package.json b/node_modules/globby/package.json
new file mode 100644
index 0000000..406594f
--- /dev/null
+++ b/node_modules/globby/package.json
@@ -0,0 +1,106 @@
+{
+ "_from": "globby@^8.0.1",
+ "_id": "globby@8.0.2",
+ "_inBundle": false,
+ "_integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==",
+ "_location": "/globby",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "globby@^8.0.1",
+ "name": "globby",
+ "escapedName": "globby",
+ "rawSpec": "^8.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^8.0.1"
+ },
+ "_requiredBy": [
+ "/grunt-contrib-imagemin/imagemin"
+ ],
+ "_resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz",
+ "_shasum": "5697619ccd95c5275dbb2d6faa42087c1a941d8d",
+ "_spec": "globby@^8.0.1",
+ "_where": "C:\\Users\\marcr\\Desktop\\KorAp\\Git\\Kalamar\\node_modules\\grunt-contrib-imagemin\\node_modules\\imagemin",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/globby/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "array-union": "^1.0.1",
+ "dir-glob": "2.0.0",
+ "fast-glob": "^2.0.2",
+ "glob": "^7.1.2",
+ "ignore": "^3.3.5",
+ "pify": "^3.0.0",
+ "slash": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Extends `glob` with support for multiple patterns and exposes a Promise API",
+ "devDependencies": {
+ "ava": "*",
+ "glob-stream": "^6.1.0",
+ "globby": "github:sindresorhus/globby#master",
+ "matcha": "^0.7.0",
+ "rimraf": "^2.2.8",
+ "xo": "^0.18.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js",
+ "gitignore.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/globby#readme",
+ "keywords": [
+ "all",
+ "array",
+ "directories",
+ "dirs",
+ "expand",
+ "files",
+ "filesystem",
+ "filter",
+ "find",
+ "fnmatch",
+ "folders",
+ "fs",
+ "glob",
+ "globbing",
+ "globs",
+ "gulpfriendly",
+ "match",
+ "matcher",
+ "minimatch",
+ "multi",
+ "multiple",
+ "paths",
+ "pattern",
+ "patterns",
+ "traverse",
+ "util",
+ "utility",
+ "wildcard",
+ "wildcards",
+ "promise",
+ "gitignore",
+ "git"
+ ],
+ "license": "MIT",
+ "name": "globby",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/globby.git"
+ },
+ "scripts": {
+ "bench": "npm update glob-stream fast-glob && matcha bench.js",
+ "test": "xo && ava"
+ },
+ "version": "8.0.2"
+}
diff --git a/node_modules/globby/readme.md b/node_modules/globby/readme.md
new file mode 100644
index 0000000..9b6b7b5
--- /dev/null
+++ b/node_modules/globby/readme.md
@@ -0,0 +1,156 @@
+# globby [](https://travis-ci.org/sindresorhus/globby)
+
+> User-friendly glob matching
+
+Based on [`fast-glob`](https://github.com/mrmlnc/fast-glob), but adds a bunch of useful features and a nicer API.
+
+
+## Features
+
+- Promise API
+- Multiple patterns
+- Negated patterns: `['foo*', '!foobar']`
+- Expands directories: `dir` → `dir/**/*`
+- Supports `.gitignore`
+
+
+## Install
+
+```
+$ npm install globby
+```
+
+
+## Usage
+
+```
+├── unicorn
+├── cake
+└── rainbow
+```
+
+```js
+const globby = require('globby');
+
+(async () => {
+ const paths = await globby(['*', '!cake']);
+
+ console.log(paths);
+ //=> ['unicorn', 'rainbow']
+})();
+```
+
+
+## API
+
+### globby(patterns, [options])
+
+Returns a `Promise<Array>` of matching paths.
+
+#### patterns
+
+Type: `string` `Array`
+
+See supported `minimatch` [patterns](https://github.com/isaacs/minimatch#usage).
+
+#### options
+
+Type: `Object`
+
+See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options) in addition to the ones below.
+
+##### expandDirectories
+
+Type: `boolean` `Array` `Object`<br>
+Default: `true`
+
+If set to `true`, `globby` will automatically glob directories for you. If you define an `Array` it will only glob files that matches the patterns inside the `Array`. You can also define an `Object` with `files` and `extensions` like below:
+
+```js
+(async () => {
+ const paths = await globby('images', {
+ expandDirectories: {
+ files: ['cat', 'unicorn', '*.jpg'],
+ extensions: ['png']
+ }
+ });
+
+ console.log(paths);
+ //=> ['cat.png', 'unicorn.png', 'cow.jpg', 'rainbow.jpg']
+})();
+```
+
+Note that if you set this option to `false`, you won't get back matched directories unless you set `nodir: false`.
+
+##### gitignore
+
+Type: `boolean`<br>
+Default: `false`
+
+Respect ignore patterns in `.gitignore` files that apply to the globbed files.
+
+### globby.sync(patterns, [options])
+
+Returns an `Array` of matching paths.
+
+### globby.generateGlobTasks(patterns, [options])
+
+Returns an `Array<Object>` in the format `{pattern: string, opts: Object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages.
+
+Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration.
+
+### globby.hasMagic(patterns, [options])
+
+Returns a `boolean` of whether there are any special glob characters in the `patterns`.
+
+Note that the options affect the results. If `noext: true` is set, then `+(a|b)` will not be considered a magic pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`, then that is considered magical, unless `nobrace: true` is set.
+
+This function is backed by [`node-glob`](https://github.com/isaacs/node-glob#globhasmagicpattern-options)
+
+### globby.gitignore([options])
+
+Returns a `Promise<(path: string) => boolean>` indicating whether a given path is ignored via a `.gitignore` file.
+
+Takes `cwd?: string` and `ignore?: string[]` as options. `.gitignore` files matched by the ignore config are not
+used for the resulting filter function.
+
+```js
+const {gitignore} = require('globby');
+
+(async () => {
+ const isIgnored = await gitignore();
+ console.log(isIgnored('some/file'));
+})();
+```
+
+### globby.gitignore.sync([options])
+
+Returns a `(path: string) => boolean` indicating whether a given path is ignored via a `.gitignore` file.
+
+Takes the same options as `globby.gitignore`.
+
+
+## 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
+
+[Various patterns and expected matches.](https://github.com/sindresorhus/multimatch/blob/master/test/test.js)
+
+
+## Related
+
+- [multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem
+- [matcher](https://github.com/sindresorhus/matcher) - Simple wildcard matching
+- [del](https://github.com/sindresorhus/del) - Delete files and directories
+- [make-dir](https://github.com/sindresorhus/make-dir) - Make a directory and its parents if needed
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)