{"_id":"@bluelovers/fast-glob","_rev":"3-ea7877aa3fd1db008bfbd92388380973","name":"@bluelovers/fast-glob","dist-tags":{"latest":"3.0.4"},"versions":{"3.0.2":{"name":"@bluelovers/fast-glob","version":"3.0.2","description":"old typescript api for fast-glob","keywords":["bluebird","fast","fast-glob","glob","implementation","patterns","promise"],"license":"ISC","author":"","main":"index.js","types":"types.d.ts","directories":{"test":"test"},"scripts":{"coverage":"npx nyc npm run test","lint":"npx eslint **/*.ts","ncu":"npx yarn-tool ncu -u","postpublish_":"git commit -m \"publish new version\" .","prepublishOnly":"npm run sort-package-json","sort-package-json":"npx sort-package-json ./package.json","test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"bluebird":"^3","fast-glob":"^3"},"devDependencies":{"@bluelovers/tsconfig":"^1.0.11","@types/bluebird":"*","@types/node":"*"},"publishConfig":{"access":"public"},"_id":"@bluelovers/fast-glob@3.0.2","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-akBR3eSYK74UYf6BbfAPzUzPw9BB6gr6pe7cGSjhi04Fehd0s8whLgMsUJss2Dawc4PQnSn4IGJE8w62j1PFzQ==","shasum":"bdfc348e9c3e80686c2d99037e07991bed2271c2","tarball":"https://registry.npmjs.org/@bluelovers/fast-glob/-/fast-glob-3.0.2.tgz","fileCount":9,"unpackedSize":30194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFGPlCRA9TVsSAnZWagAAD1gQAJIo0p/tfHt049967NUR\nQmKu6DN7BDB2AEtuvpYVheQoLu9LAHYzhHj5OVtdDi/KCZxA/K3I/r0WEoFT\nevX5rYf9E0sNr+FvJG7KINR9uT1Yt/DErdvzc6+GgDETMw5vB4hIBygfV9Cj\nwOqkitDKHGNMaVlqYsV5gfpPWW3Ic1U1tNmVO2Q18GNZeUo+RE53mSNRfzbR\nvsclkM6jFc901j6WrQZv8fNdpqT+5wcpo5W+5Szd6bK/2ch/ZwtbMEnI07sR\nROCtnSCDqVI0Y8cl4Vx6aaDYr+IkB01ub2fmLMB2l4PR2PoZcd71axcrloaw\nZpjxgg2wd4I3V8TOqIYhfgzP5uXqD163n+Bl/6MZH8bGvUwH4+BqKK5+jf8f\nT+U/iXWey0zcFz6240io6pDNxRjE690+Gwr+Ng7AePwZWEtlvaJRA15Hidnt\nL8FHWIpyK+Jt4JsvtCiyTyLonqCDMmueug8vhztSqDIsqKD/5FO98lhTRFiy\nUoRUhVK+CDbLp8oS3/bMm9CZy0ruaf/OTt6ry3Sl2KHpIB5gjQXPjT1dfIaX\n5PyPZca5IxK7MWdKuG4Sj0BJzCYv7Dsm+iraVp0yjgv+p1+PNLmLUNTPt+qx\nE84jbDXvCOP8CVRgS4olspfNI+qk3q103cG9ElomvMEpAh7+LhSMICSj47tx\ne6jP\r\n=K9zC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrmWEajkxda0dSy1zlgAtMcrkXAfKTlfvPcqjz7H4vLwIhALer+H0wGbeopkJLavAqh0suPAxRTv6BvbswnPgrQ3El"}]},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-glob_3.0.2_1561617381039_0.31662048212224536"},"_hasShrinkwrap":false},"3.0.3":{"name":"@bluelovers/fast-glob","version":"3.0.3","description":"old typescript api for fast-glob","keywords":["bluebird","fast","fast-glob","glob","implementation","patterns","promise"],"license":"ISC","author":"","main":"index.js","types":"types.d.ts","directories":{"test":"test"},"scripts":{"coverage":"npx nyc npm run test","lint":"npx eslint **/*.ts","ncu":"npx yarn-tool ncu -u","postpublish_":"git commit -m \"publish new version\" .","prepublishOnly":"npm run sort-package-json","sort-package-json":"npx sort-package-json ./package.json","test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"bluebird":"^3","fast-glob":"^3"},"devDependencies":{"@bluelovers/tsconfig":"^1.0.11","@types/bluebird":"*","@types/node":"*"},"publishConfig":{"access":"public"},"_id":"@bluelovers/fast-glob@3.0.3","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Z64EyGhAkUrEE8udCDQDItXXms8TGqChAguI1C8ImILlExgGjOteXWZURS8INNiUNThfdZr6SQ9kC2qW3ylBAQ==","shasum":"8362cdb48845bf4f344afab2d70aa7b6a9b70099","tarball":"https://registry.npmjs.org/@bluelovers/fast-glob/-/fast-glob-3.0.3.tgz","fileCount":9,"unpackedSize":30721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFHfuCRA9TVsSAnZWagAAyNkP/RzTTD0BXxh7pKEYMQaW\n5cOq3hnoDNTdaDntjXc7/IDBU4GxMYBK/iIt6H75FlHnA4Y+kHOwyYhfmQfJ\nRGr1WpxOcx10BQwM2SbcaxzkEMk8hIdCFryzVuE7Vtlq/44vBm0cew/rzFRb\n37TYy+rCPSRb55YG8qRWO39h/47SYrkDwLgK5DPze9I3lYv+9ksteQvMMhQt\n6vY2ojH8uR/x87fdbtsvs+7GwNJ6hG4ZVqESbxnNxsEE5b1s7OkC9dHyF6g3\nzWWbGVFtNEM8ThRnApvGzXpf9x1hpTRzr2qy8ZQE1Yo+bk/Z0+tNbGhP3j+w\nE14DBnwAAjFOACLncjqmd2EX3Y6d+hfVO2CK3qDCghWAAYMZ3XZdCU3V4as+\n7rMAzda9aqfjak9/Wjv4YoQK6f+4eoqBlREgpzwVeo8hFSOIULp8/dAeI0O7\nujZtpYbn2jVlcfNyFjFWFJQGZD8k26DBMGizYR1yGxo52n4M6T6nLJ727CfV\n9HSCV+PfpzGk4NZ91ziMM7DtM0KQB3Sa3h2oCkaoZf0Y6QMR5cPb+SGM/sgf\nudR3g5jcgnpM9X3zYuImS0kSVqmoQonClQ2+zBQIFrht7cir5XZjk8OZlbHw\nu+HxmazMfi+dtOF/bQuqFf42Dz3t5/RdYsZhGKrx+WbtylzVOLrZUZ3a+9g9\nPX++\r\n=2xsk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAIOA4sXfH+pbdZY7J3QFjkaGkotWJoDcZZ3z74mCqDfAiEAoq9QDVSRadhabd5YSBvP5W3ZJJR0uBUiO/qME68VY8g="}]},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-glob_3.0.3_1561622510209_0.5390022124901288"},"_hasShrinkwrap":false},"3.0.4":{"name":"@bluelovers/fast-glob","version":"3.0.4","description":"old typescript api for fast-glob","keywords":["bluebird","fast","fast-glob","glob","implementation","patterns","promise"],"homepage":"https://github.com/bluelovers/fast-glob-v2-api#readme","bugs":{"url":"https://github.com/bluelovers/fast-glob-v2-api/issues"},"repository":{"type":"git","url":"git+https://github.com/bluelovers/fast-glob-v2-api.git"},"license":"ISC","author":"","main":"index.js","types":"types.d.ts","directories":{"test":"test"},"scripts":{"coverage":"npx nyc npm run test","lint":"npx eslint **/*.ts","ncu":"npx yarn-tool ncu -u","npm:publish":"npm publish","prepublishOnly":"npm run sort-package-json","postpublish":"git commit -m \"publish new version\" .","sort-package-json":"npx sort-package-json ./package.json","test":"echo \"Error: no test specified\" && exit 1","tsc:default":"tsc -p tsconfig.json","tsc:esm":"tsc -p tsconfig.esm.json"},"dependencies":{"bluebird":"^3","fast-glob":"^3"},"devDependencies":{"@bluelovers/tsconfig":"^1.0.12","@types/bluebird":"*","@types/node":"*"},"publishConfig":{"access":"public"},"gitHead":"b0a6e934eff61c75503423828910c6d3caead7b5","_id":"@bluelovers/fast-glob@3.0.4","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-djAOOjDWXolYArm5NXxOIX7Q7OGhAaRtMs5F968OxelWkMUU6PyU6tS66CFykVON4U5y8jXcsnVAFCaeuf1nEA==","shasum":"6bb11e3e0274451a2b1362763e85fd50120f7ea3","tarball":"https://registry.npmjs.org/@bluelovers/fast-glob/-/fast-glob-3.0.4.tgz","fileCount":9,"unpackedSize":31647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdH/G9CRA9TVsSAnZWagAAsr8P/0YL29zzywkagcFFROe3\nHyhjbR8qRnSUDtbrCfEzoJOAj9KDVNkN0XtFxzYc73TGQSoNIjSkBUWTVTVg\n1pAKO13A3Y0BbeyqdZ8Qua9FeYDbFyDjYejhE4UxyNMw8ptt/4NI/gfAgHsO\nNRg+JQ9HMqSuHZ95CXtOejL2NGNXmuvdy3nI7R4kv5RRwRFJ+gOSS3AjSxxj\nxIJcx4C5Bc7xS/iyFfHo2UD8fqjHGYiPJtsTPTGa4BK8jx9RoZcbf1EdyjRq\nLYAy2Mk3u0dXmok2RZGjU7XlBbTNt0Wq7ji0tauVgU4rWBkPghOhNlpSj73J\nZ2/+C7g3PCcZ+0QNJvG9UoMwoJ4pKYJnVyXfJuKewRtJfjC882r7BMWYFiFe\n2Su8I9HMVhwPKLlKJHSjnW1SGRegKRDZgLTDgwA2yUjnwvuiCZnirSz3Cqlw\nVXxW4NOGrxCjle5h3yrjEdlT0Vxe83tHaMDJ1HhP1BPr4GCLw2frsgwPJwAn\nK9MfYm42iAAYvLTiOdllYGYxUIfejH01262afi+JeC6fb7lVu0kPPJ09tUUf\n6jqqnsPxMyv5DrmA8eVGMLiIoJuKQ1b5xHJRE37peh34x8ETjLaQTCxK806/\nJULE9nDwoc7Fxd27w04u5RB2U9zZM5NB2hlDcrv1+rdo/VGC5hbgeymefjT0\nLe9e\r\n=56OS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGW0KI/cBis1iyo+XaqsHKIKsxu3Jze4/a5igIUoo/W+AiEAjNzJBDMpf/Mx71BjvlRRrgmj87/y8GGgh4mKScZr1YU="}]},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-glob_3.0.4_1562374588267_0.4607608916140937"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-27T06:36:21.009Z","3.0.2":"2019-06-27T06:36:21.227Z","modified":"2022-04-04T19:49:06.954Z","3.0.3":"2019-06-27T08:01:50.367Z","3.0.4":"2019-07-06T00:56:28.400Z"},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"description":"old typescript api for fast-glob","keywords":["bluebird","fast","fast-glob","glob","implementation","patterns","promise"],"license":"ISC","readme":"# fast-glob\n\n> It's a very fast and efficient [glob][glob_definition] library for [Node.js][node_js].\n\nThis package provides methods for traversing the file system and returning pathnames that matched a defined set of a specified pattern according to the rules used by the Unix Bash shell with some simplifications, meanwhile results are returned in **arbitrary order**. Quick, simple, effective.\n\n## this fork\n\n> fork from https://github.com/mrmlnc/fast-glob\n\n- export `async`, `default`\n- allow old typescript api `async<T>`, `sync<T>`\n- wrap to `bluebird` **(Optional)**\n\n### usage\n\n> base\n\n```ts\nimport FastGlob, { Options, EntryItem } from '@bluelovers/fast-glob';\n```\n\n---\n\n> bluebird\n\n```ts\nimport FastGlob, { Options, EntryItem } from '@bluelovers/fast-glob/bluebird';\n```\n\n---\n\n> use other Bluebird like or any object with promisify method\n\n```ts\nconst promisify = require('@bluelovers/fast-glob/util').promisify;\nconst Bluebird = require(\"bluebird\");\n```\n\n```ts\nconst FastGlob = promisify(require('@bluelovers/fast-glob'));\n\n// use other Bluebird like or any object with promisify method\nconst FastGlob = promisify(require('@bluelovers/fast-glob'), Bluebird);\n```\n\n```ts\nconst my_promisify = (fn) => {\n return function (...argv)\n {\n  return Promise.resolve().then(function ()\n  {\n   return fn(...argv)\n  })\n }\n}\n\nconst FastGlob = promisify(require('@bluelovers/fast-glob'), my_promisify);\n\nconst FastGlob = promisify(require('@bluelovers/fast-glob'), {\n    promisify: my_promisify\n});\n```\n\n## Table of Contents\n\n<details>\n<summary><strong>Details</strong></summary>\n\n* [Highlights](#highlights)\n* [Donation](#donation)\n* [Old and modern mode](#old-and-modern-mode)\n* [Pattern syntax](#pattern-syntax)\n  * [Basic syntax](#basic-syntax)\n  * [Advanced syntax](#advanced-syntax)\n* [Installation](#installation)\n* [API](#api)\n  * [Asynchronous](#asynchronous)\n  * [Synchronous](#synchronous)\n  * [Stream](#stream)\n    * [patterns](#patterns)\n    * [[options]](#options)\n* [Options](#options-1)\n  * [Common](#common)\n    * [concurrency](#concurrency)\n    * [cwd](#cwd)\n    * [deep](#deep)\n    * [followSymbolicLinks](#followsymboliclinks)\n    * [fs](#fs)\n    * [ignore](#ignore)\n    * [suppressErrors](#suppresserrors)\n    * [throwErrorOnBrokenSymbolicLink](#throwerroronbrokensymboliclink)\n  * [Output control](#output-control)\n    * [absolute](#absolute)\n    * [markDirectories](#markdirectories)\n    * [objectMode](#objectmode)\n    * [onlyDirectories](#onlydirectories)\n    * [onlyFiles](#onlyfiles)\n    * [stats](#stats)\n    * [unique](#unique)\n  * [Matching control](#matching-control)\n    * [braceExpansion](#braceexpansion)\n    * [caseSensitiveMatch](#casesensitivematch)\n    * [dot](#dot)\n    * [extglob](#extglob)\n    * [globstar](#globstar)\n    * [baseNameMatch](#basenamematch)\n* [FAQ](#faq)\n  * [How to write patterns on Windows?](#how-to-write-patterns-on-windows)\n  * [Why are parentheses match wrong?](#why-are-parentheses-match-wrong)\n  * [How to exclude directory from reading?](#how-to-exclude-directory-from-reading)\n  * [How to use UNC path?](#how-to-use-unc-path)\n  * [Compatible with `node-glob`?](#compatible-with-node-glob)\n* [Benchmarks](#benchmarks)\n  * [Server](#server)\n  * [Nettop](#nettop)\n* [Changelog](#changelog)\n* [License](#license)\n\n</details>\n\n## Highlights\n\n* Fast. Probably the fastest.\n* Supports multiple and negative patterns.\n* Synchronous, Promise and Stream API.\n* Object mode. Can return more than just strings.\n* Error-tolerant.\n\n## Donation\n\nDo you like this project? Support it by donating, creating an issue or pull request.\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)][paypal_mrmlnc]\n\n## Old and modern mode\n\nThis package works in two modes, depending on the environment in which it is used.\n\n* **Old mode**. Node.js below 10.10 or when the [`stats`](#stats) option is *enabled*.\n* **Modern mode**. Node.js 10.10+ and the [`stats`](#stats) option is *disabled*.\n\nThe modern mode is faster. Learn more about the [internal mechanism][nodelib_fs_scandir_old_and_modern_modern].\n\n## Pattern syntax\n\n> :warning: Always use forward-slashes in glob expressions (patterns and [`ignore`](#ignore) option). Use backslashes for escaping characters.\n\nThere is more than one form of syntax: basic and advanced. Below is a brief overview of the supported features. Also pay attention to our [FAQ](#faq).\n\n> :book: This package uses a [`micromatch`][micromatch] as a library for pattern matching.\n\n### Basic syntax\n\n* An asterisk (`*`) — matches everything except slashes (path separators), hidden files (names starting with `.`).\n* A double star or globstar (`**`) — matches zero or more directories.\n* Question mark (`?`) – matches any single character except slashes (path separators).\n* Sequence (`[seq]`) — matches any character in sequence.\n\n> :book: A few additional words about the [basic matching behavior][picomatch_matching_behavior].\n\nSome examples:\n\n* `src/**/*.js` — matches all files in the `src` directory (any level of nesting) that have the `.js` extension.\n* `src/*.??` — matches all files in the `src` directory (only first level of nesting) that have a two-character extension.\n* `file-[01].js` — matches files: `file-0.js`, `file-1.js`.\n\n### Advanced syntax\n\n* [Escapes characters][micromatch_backslashes] (`\\\\`) — matching special characters (`$^*+?()[]`) as literals.\n* [POSIX character classes][picomatch_posix_brackets] (`[[:digit:]]`).\n* [Extended globs][micromatch_extglobs] (`?(pattern-list)`).\n* [Bash style brace expansions][micromatch_braces] (`{}`).\n* [Regexp character classes][micromatch_regex_character_classes] (`[1-5]`).\n* [Regex groups][regular_expressions_brackets] (`(a|b)`).\n\n> :book: A few additional words about the [advanced matching behavior][micromatch_extended_globbing].\n\nSome examples:\n\n* `src/**/*.{css,scss)` — matches all files in the `src` directory (any level of nesting) that have the `.css` or `.scss` extension.\n* `file-[[:digit:]].js` — matches files: `file-0.js`, `file-1.js`, …, `file-9.js`.\n* `file-{1..3}.js` — matches files: `file-1.js`, `file-2.js`, `file-3.js`.\n* `file-(1|2)` — matches files: `file-1.js`, `file-2.js`.\n\n## Installation\n\n```console\nnpm install fast-glob\n```\n\n## API\n\n### Asynchronous\n\n```js\nfg(patterns, [options])\n```\n\nReturns a `Promise` with an array of matching entries.\n\n```js\nconst fg = require('fast-glob');\n\nconst entries = await fg(['.editorconfig', '**/index.js'], { dot: true });\n\n// ['.editorconfig', 'services/index.js']\n```\n\n### Synchronous\n\n```js\nfg.sync(patterns, [options])\n```\n\nReturns an array of matching entries.\n\n```js\nconst fg = require('fast-glob');\n\nconst entries = fg.sync(['.editorconfig', '**/index.js'], { dot: true });\n\n// ['.editorconfig', 'services/index.js']\n```\n\n### Stream\n\n```js\nfg.stream(patterns, [options])\n```\n\nReturns a [`ReadableStream`][node_js_stream_readable_streams] when the `data` event will be emitted with matching entry.\n\n```js\nconst fg = require('fast-glob');\n\nconst stream = fg.sync(['.editorconfig', '**/index.js'], { dot: true });\n\nfor await (const entry of stream) {\n\t// .editorconfig\n\t// services/index.js\n}\n```\n\n#### patterns\n\n* Required: `true`\n* Type: `string | string[]`\n\nAny correct pattern(s).\n\n> :1234: [Pattern syntax](#pattern-syntax)\n>\n> :warning: This package does not respect the order of patterns. First, all the negative patterns are applied, and only then the positive patterns. If you want to get a certain order of records, use sorting or split calls.\n\n#### [options]\n\n* Required: `false`\n* Type: [`Options`](#options-1)\n\nSee [Options](#options-1) section.\n\n## Options\n\n### Common options\n\n#### concurrency\n\n* Type: `number`\n* Default: `os.cpus().length`\n\nSpecifies the maximum number of concurrent requests from a reader to read directories.\n\n> :book: The higher the number, the higher the performance and load on the file system. If you want to read in quiet mode, set the value to a comfortable number or `1`.\n\n#### cwd\n\n* Type: `string`\n* Default: `process.cwd()`\n\nThe current working directory in which to search.\n\n#### deep\n\n* Type: `number`\n* Default: `Infinity`\n\nSpecifies the maximum depth of a read directory relative to the start directory.\n\nFor example, you have the following tree:\n\n```js\ndir/\n└── one/            // 1\n    └── two/        // 2\n        └── file.js // 3\n```\n\n```js\n// With base directory\nfg.sync('dir/**', { onlyFiles: false, deep: 1 }); // ['dir/one']\nfg.sync('dir/**', { onlyFiles: false, deep: 2 }); // ['dir/one', 'dir/one/two']\n\n// With cwd option\nfg.sync('**', { onlyFiles: false, cwd: 'dir', deep: 1 }); // ['one']\nfg.sync('**', { onlyFiles: false, cwd: 'dir', deep: 2 }); // ['one', 'one/two']\n```\n\n> :book: If you specify a pattern with some base directory, this directory will not participate in the calculation of the depth of the found directories. Think of it as a [`cwd`](#cwd) option.\n\n#### followSymbolicLinks\n\n* Type: `boolean`\n* Default: `true`\n\nIndicates whether to traverse descendants of symbolic link directories.\n\n> :book: If the [`stats`](#stats) option is specified, the information about the symbolic link (`fs.lstat`) will be replaced with information about the entry (`fs.stat`) behind it.\n\n#### fs\n\n* Type: `FileSystemAdapter`\n* Default: `fs.*`\n\nCustom implementation of methods for working with the file system.\n\n```ts\nexport interface FileSystemAdapter {\n    lstat?: typeof fs.lstat;\n    stat?: typeof fs.stat;\n    lstatSync?: typeof fs.lstatSync;\n    statSync?: typeof fs.statSync;\n    readdir?: typeof fs.readdir;\n    readdirSync?: typeof fs.readdirSync;\n}\n```\n\n#### ignore\n\n* Type: `string[]`\n* Default: `[]`\n\nAn array of glob patterns to exclude matches. This is an alternative way to use negative patterns.\n\n```js\ndir/\n├── package-lock.json\n└── package.json\n```\n\n```js\nfg.sync(['*.json', '!package-lock.json']);            // ['package.json']\nfg.sync('*.json', { ignore: ['package-lock.json'] }); // ['package.json']\n```\n\n#### suppressErrors\n\n* Type: `boolean`\n* Default: `false`\n\nBy default this package suppress only `ENOENT` errors. Set to `true` to suppress any error.\n\n> :book: Can be useful when the directory has entries with a special level of access.\n\n#### throwErrorOnBrokenSymbolicLink\n\n* Type: `boolean`\n* Default: `false`\n\nThrow an error when symbolic link is broken if `true` or safely return `lstat` call if `false`.\n\n> :book: This option has no effect on errors when reading the symbolic link directory.\n\n### Output control\n\n#### absolute\n\n* Type: `boolean`\n* Default: `false`\n\nReturn the absolute path for entries.\n\n```js\nfg.sync('*.js', { absolute: false }); // ['index.js']\nfg.sync('*.js', { absolute: true });  // ['/home/user/index.js']\n```\n\n> :book: This option is required if you want to use negative patterns with absolute path, for example, `!${__dirname}/*.js`.\n\n#### markDirectories\n\n* Type: `boolean`\n* Default: `false`\n\nMark the directory path with the final slash.\n\n```js\nfs.sync('*', { onlyFiles: false, markDirectories: false }); // ['index.js', 'controllers']\nfs.sync('*', { onlyFiles: false, markDirectories: true });  // ['index.js', 'controllers/']\n```\n\n#### objectMode\n\n* Type: `boolean`\n* Default: `false`\n\nReturns objects (instead of strings) describing entries.\n\n```js\nfg.sync('*', { objectMode: false }); // ['src/index.js']\nfg.sync('*', { objectMode: true });  // [{ name: 'index.js', path: 'src/index.js', dirent: <fs.Dirent> }]\n```\n\nThe object has the following fields:\n\n* name (`string`) — the last part of the path (basename)\n* path (`string`) — full path relative to the pattern base directory\n* dirent ([`fs.Dirent`][node_js_fs_class_fs_dirent]) — instance of `fs.Direct`\n\n> :book: An object is an internal representation of entry, so getting it does not affect performance.\n\n#### onlyDirectories\n\n* Type: `boolean`\n* Default: `false`\n\nReturn only directories.\n\n```js\nfg.sync('*', { onlyDirectories: false }); // ['index.js', 'src']\nfg.sync('*', { onlyDirectories: true });  // ['src']\n```\n\n> :book: If `true`, the [`onlyFiles`](#onlyfiles) option is automatically `false`.\n\n#### onlyFiles\n\n* Type: `boolean`\n* Default: `false`\n\nReturn only files.\n\n```js\nfg.sync('*', { onlyFiles: false }); // ['index.js', 'src']\nfg.sync('*', { onlyFiles: true });  // ['index.js']\n```\n\n#### stats\n\n* Type: `boolean`\n* Default: `false`\n\nEnables an [object mode](#objectmode) with an additional field:\n\n* stats ([`fs.Stats`][node_js_fs_class_fs_stats]) — instance of `fs.Stats`\n\n```js\nfg.sync('*', { stats: false }); // ['src/index.js']\nfg.sync('*', { stats: true });  // [{ name: 'index.js', path: 'src/index.js', dirent: <fs.Dirent>, stats: <fs.Stats> }]\n```\n\n> :book: Returns `fs.stat` instead of `fs.lstat` for symbolic links when the [`followSymbolicLinks`](#followsymboliclinks) option is specified.\n>\n> :warning: Unlike [object mode](#objectmode) this mode requires additional calls to the file system. On average, this mode is slower at least twice. See [old and modern mode](#old-and-modern-mode) for more details.\n\n#### unique\n\n* Type: `boolean`\n* Default: `true`\n\nEnsures that the returned entries are unique.\n\n```js\nfg.sync(['*.json', 'package.json'], { unique: false }); // ['package.json', 'package.json']\nfg.sync(['*.json', 'package.json'], { unique: true });  // ['package.json']\n```\n\nIf `true` and similar entries are found, the result is the first found.\n\n### Matching control\n\n#### braceExpansion\n\n* Type: `boolean`\n* Default: `true`\n\nEnables Bash-like brace expansion.\n\n> :1234: [Syntax description][bash_hackers_syntax_expansion_brace] or more [detailed description][micromatch_braces].\n\n```js\ndir/\n├── abd\n├── acd\n└── a{b,c}d\n```\n\n```js\nfg.sync('a{b,c}d', { braceExpansion: false }); // ['a{b,c}d']\nfg.sync('a{b,c}d', { braceExpansion: true });  // ['abd', 'acd']\n```\n\n#### caseSensitiveMatch\n\n* Type: `boolean`\n* Default: `true`\n\nEnables a [case-sensitive][wikipedia_case_sensitivity] mode for matching files.\n\n```js\ndir/\n├── file.txt\n└── File.txt\n```\n\n```js\nfg.sync('file.txt', { caseSensitiveMatch: false }); // ['file.txt', 'File.txt']\nfg.sync('file.txt', { caseSensitiveMatch: true });  // ['file.txt']\n```\n\n#### dot\n\n* Type: `boolean`\n* Default: `false`\n\nAllow patterns to match entries that begin with a period (`.`).\n\n> :book: Note that an explicit dot in a portion of the pattern will always match dot files.\n\n```js\ndir/\n├── .editorconfig\n└── package.json\n```\n\n```js\nfg.sync('file.txt', { dot: false }); // ['package.json']\nfg.sync('file.txt', { dot: true });  // ['.editorconfig', 'package.json']\n```\n\n#### extglob\n\n* Type: `boolean`\n* Default: `true`\n\nEnables Bash-like `extglob` functionality.\n\n> :1234: [Syntax description][micromatch_extglobs].\n\n```js\ndir/\n├── README.md\n└── package.json\n```\n\n```js\nfg.sync('*.+(json|md)', { extglob: false }); // []\nfg.sync('*.+(json|md)', { extglob: true });  // ['README.md', 'package.json']\n```\n\n#### globstar\n\n* Type: `boolean`\n* Default: `true`\n\nEnables recursively repeats a pattern containing `**`. If `false`, `**` behaves exactly like `*`.\n\n```js\ndir/\n└── a\n    └── b\n```\n\n```js\nfg.sync('**', { onlyFiles: false, globstar: false }); // ['a']\nfg.sync('**', { onlyFiles: false, globstar: true });  // ['a', 'a/b']\n```\n\n#### baseNameMatch\n\n* Type: `boolean`\n* Default: `false`\n\nIf set to `true`, then patterns without slashes will be matched against the basename of the path if it contains slashes.\n\n```js\ndir/\n└── one/\n    └── file.md\n```\n\n```js\nfg.sync('*.md', { baseNameMatch: false }); // []\nfg.sync('*.md', { baseNameMatch: true });  // ['one/file.md']\n```\n\n## FAQ\n\n## How to write patterns on Windows?\n\nAlways use forward-slashes in glob expressions (patterns and [`ignore`](#ignore) option). Use backslashes for escaping characters. With the [`cwd`](#cwd) option use a convenient format.\n\n**Bad**\n\n```ts\n[\n\t'directory\\\\*',\n\tpath.join(process.cwd(), '**')\n]\n```\n\n**Good**\n\n```ts\n[\n\t'directory/*',\n\tpath.join(process.cwd(), '**').replace(/\\\\/g, '/')\n]\n```\n\n> :book: Use the [`normalize-path`][npm_normalize_path] or the [`unixify`][npm_unixify] package to convert Windows-style path to a Unix-style path.\n\nRead more about [matching with backslashes][micromatch_backslashes].\n\n## Why are parentheses match wrong?\n\n```js\ndir/\n└── (special-*file).txt\n```\n\n```js\nfg.sync(['(special-*file).txt']) // []\n```\n\nRefers to Bash. You need to escape special characters:\n\n```js\nfg.sync(['\\\\(special-*file\\\\).txt']) // ['(special-*file).txt']\n```\n\nRead more about [matching special characters as literals][picomatch_matching_special_characters_as_literals].\n\n## How to exclude directory from reading?\n\nYou can use a negative pattern like this: `!**/node_modules` or `!**/node_modules/**`. Also you can use [`ignore`](#ignore) option. Just look at the example below.\n\n```js\nfirst/\n├── file.md\n└── second/\n    └── file.txt\n```\n\nIf you don't want to read the `second` directory, you must write the following pattern: `!**/second` or `!**/second/**`.\n\n```js\nfg.sync(['**/*.md', '!**/second']);                 // ['first/file.md']\nfg.sync(['**/*.md'], { ignore: ['**/second/**'] }); // ['first/file.md']\n```\n\n> :warning: When you write `!**/second/**/*` it means that the directory will be **read**, but all the entries will not be included in the results.\n\nYou have to understand that if you write the pattern to exclude directories, then the directory will not be read under any circumstances.\n\n## How to use UNC path?\n\nYou cannot use [Uniform Naming Convention (UNC)][unc_path] paths as patterns (due to syntax), but you can use them as [`cwd`](#cwd) directory.\n\n```ts\nfg.sync('*', { cwd: '\\\\\\\\?\\\\C:\\\\Python27' /* or //?/C:/Python27 */ });\nfg.sync('Python27/*', { cwd: '\\\\\\\\?\\\\C:\\\\' /* or //?/C:/ */ });\n```\n\n## Compatible with `node-glob`?\n\n| node-glob    | fast-glob |\n| :----------: | :-------: |\n| `cwd`        | [`cwd`](#cwd) |\n| `root`       | – |\n| `dot`        | [`dot`](#dot) |\n| `nomount`    | – |\n| `mark`       | [`markDirectories`](#markdirectories) |\n| `nosort`     | – |\n| `nounique`   | [`unique`](#unique) |\n| `nobrace`    | [`braceExpansion`](#braceexpansion) |\n| `noglobstar` | [`globstar`](#globstar) |\n| `noext`      | [`extglob`](#extglob) |\n| `nocase`     | [`caseSensitiveMatch`](#casesensitivematch) |\n| `matchBase`  | [`baseNameMatch`](#basenamematch) |\n| `nodir`      | [`onlyFiles`](#onlyfiles) |\n| `ignore`     | [`ignore`](#ignore) |\n| `follow`     | [`followSymbolicLinks`](#followsymboliclinks) |\n| `realpath`   | – |\n| `absolute`   | [`absolute`](#absolute) |\n\n## Benchmarks\n\n### Server\n\nLink: [Vultr Bare Metal][vultr_pricing_baremetal]\n\n* Processor: E3-1270v6 (8 CPU)\n* RAM: 32GB\n* Disk: SSD ([Intel DC S3520 SSDSC2BB240G7][intel_ssd])\n\nYou can see results [here][github_gist_benchmark_server] for latest release.\n\n### Nettop\n\nLink: [Zotac bi323][zotac_bi323]\n\n* Processor: Intel N3150 (4 CPU)\n* RAM: 8GB\n* Disk: SSD ([Silicon Power SP060GBSS3S55S25][silicon_power_ssd])\n\nYou can see results [here][github_gist_benchmark_nettop] for latest release.\n\n## Changelog\n\nSee the [Releases section of our GitHub project][github_releases] for changelog for each release version.\n\n## License\n\nThis software is released under the terms of the MIT license.\n\n[bash_hackers_syntax_expansion_brace]: https://wiki.bash-hackers.org/syntax/expansion/brace\n[github_gist_benchmark_nettop]: https://gist.github.com/mrmlnc/f06246b197f53c356895fa35355a367c#file-fast_glob_benchmark_nettop-txt\n[github_gist_benchmark_server]: https://gist.github.com/mrmlnc/f06246b197f53c356895fa35355a367c#file-fast_glob_benchmark_server-txt\n[github_releases]: https://github.com/mrmlnc/fast-glob/releases\n[glob_definition]: https://en.wikipedia.org/wiki/Glob_(programming)\n[glob_linux_man]: http://man7.org/linux/man-pages/man3/glob.3.html\n[intel_ssd]: https://ark.intel.com/content/www/us/en/ark/products/93012/intel-ssd-dc-s3520-series-240gb-2-5in-sata-6gb-s-3d1-mlc.html\n[micromatch_backslashes]: https://github.com/micromatch/micromatch#backslashes\n[micromatch_braces]: https://github.com/micromatch/braces\n[micromatch_extended_globbing]: https://github.com/micromatch/micromatch#extended-globbing\n[micromatch_extglobs]: https://github.com/micromatch/micromatch#extglobs\n[micromatch_regex_character_classes]: https://github.com/micromatch/micromatch#regex-character-classes\n[micromatch]: https://github.com/micromatch/micromatch\n[node_js_fs_class_fs_dirent]: https://nodejs.org/api/fs.html#fs_class_fs_dirent\n[node_js_fs_class_fs_stats]: https://nodejs.org/api/fs.html#fs_class_fs_stats\n[node_js_stream_readable_streams]: https://nodejs.org/api/stream.html#stream_readable_streams\n[node_js]: https://nodejs.org/en\n[nodelib_fs_scandir_old_and_modern_modern]: https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode\n[npm_normalize_path]: https://www.npmjs.com/package/normalize-path\n[npm_unixify]: https://www.npmjs.com/package/unixify\n[paypal_mrmlnc]:https://paypal.me/mrmlnc\n[picomatch_matching_behavior]: https://github.com/micromatch/picomatch#matching-behavior-vs-bash\n[picomatch_matching_special_characters_as_literals]: https://github.com/micromatch/picomatch#matching-special-characters-as-literals\n[picomatch_posix_brackets]: https://github.com/micromatch/picomatch#posix-brackets\n[regular_expressions_brackets]: https://www.regular-expressions.info/brackets.html\n[silicon_power_ssd]: https://www.silicon-power.com/web/product-1\n[unc_path]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/62e862f4-2a51-452e-8eeb-dc4ff5ee33cc\n[vultr_pricing_baremetal]: https://www.vultr.com/pricing/baremetal\n[wikipedia_case_sensitivity]: https://en.wikipedia.org/wiki/Case_sensitivity\n[zotac_bi323]: https://www.zotac.com/ee/product/mini_pcs/zbox-bi323\n","readmeFilename":"README.md","homepage":"https://github.com/bluelovers/fast-glob-v2-api#readme","repository":{"type":"git","url":"git+https://github.com/bluelovers/fast-glob-v2-api.git"},"bugs":{"url":"https://github.com/bluelovers/fast-glob-v2-api/issues"}}