{"_id":"@cjser/globby__v14_1_0","name":"@cjser/globby__v14_1_0","dist-tags":{"latest":"14.1.0-cjser.2"},"versions":{"14.1.0-cjser.2":{"name":"@cjser/globby__v14_1_0","version":"14.1.0-cjser.2","description":"User-friendly glob matching","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","require":"./dist-cjser/index.cjs","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"bench":"npm update @globby/main-branch glob-stream fast-glob && node bench.js","test":"xo && ava && tsd"},"keywords":["all","array","directories","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"],"dependencies":{"fast-glob":"^3.3.3","ignore":"^7.0.3","@cjser/sindresorhus__merge-streams__v2_3_0":"2.3.0-cjser.2","@cjser/path-type":"6.0.0-cjser.2","@cjser/slash":"5.1.0-cjser.2","@cjser/unicorn-magic__v0_3_0":"0.3.0-cjser.2"},"devDependencies":{"@globby/main-branch":"github:sindresorhus/globby#main","@types/node":"^22.13.1","ava":"^5.3.1","benchmark":"2.1.4","glob-stream":"^8.0.0","tempy":"^3.1.0","tsd":"^0.31.2","xo":"^0.60.0"},"xo":{"ignores":["fixtures"]},"ava":{"files":["!tests/utilities.js"],"workerThreads":false},"types":"./index.d.ts","main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"14.1.0","cjserVersion":2,"original":{"name":"globby","version":"14.1.0","exports":{"types":"./index.d.ts","default":"./index.js"},"repository":"sindresorhus/globby","dependencies":{"@sindresorhus/merge-streams":"^2.1.0","fast-glob":"^3.3.3","ignore":"^7.0.3","path-type":"^6.0.0","slash":"^5.1.0","unicorn-magic":"^0.3.0"},"files":["index.js","index.d.ts","ignore.js","utilities.js"],"scripts":{"bench":"npm update @globby/main-branch glob-stream fast-glob && node bench.js","test":"xo && ava && tsd"}}},"_id":"@cjser/globby__v14_1_0@14.1.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-S3y1gHGju4YpoIuHIto3K5ZnXg8sFIGszH/mWEla9kTMYgvbN7cbLowjjry6ylnJryxyInM+dFrviAcmQdBNRw==","shasum":"eb0d74fe8a6db0905e2621271aaa1ea0053f7cc1","tarball":"https://registry.npmjs.org/@cjser/globby__v14_1_0/-/globby__v14_1_0-14.1.0-cjser.2.tgz","fileCount":8,"unpackedSize":44794,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDpgZNSe9/fSgaOE1I+rWJ6pUX/sX3io0tXumTbtYs67AIgJMPbdgNsI1tsTbeujkWIdsV2Imq5ZbFumA9DPa/6FcE="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/globby__v14_1_0_14.1.0-cjser.2_1778158341159_0.5639310729699967"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T12:52:21.085Z","14.1.0-cjser.2":"2026-05-07T12:52:21.318Z","modified":"2026-05-07T12:52:21.471Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"User-friendly glob matching","keywords":["all","array","directories","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"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# globby\n\n> User-friendly glob matching\n\nBased on [`fast-glob`](https://github.com/mrmlnc/fast-glob) but adds a bunch of useful features.\n\n## Features\n\n- Promise API\n- Multiple patterns\n- Negated patterns: `['foo*', '!foobar']`\n- Expands directories: `foo` → `foo/**/*`\n- Supports `.gitignore` and similar ignore config files\n- Supports `URL` as `cwd`\n\n## Install\n\n```sh\nnpm install globby\n```\n\n## Usage\n\n```\n├── unicorn\n├── cake\n└── rainbow\n```\n\n```js\nimport {globby} from 'globby';\n\nconst paths = await globby(['*', '!cake']);\n\nconsole.log(paths);\n//=> ['unicorn', 'rainbow']\n```\n\n## API\n\nNote that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`.\n\n### globby(patterns, options?)\n\nReturns a `Promise<string[]>` of matching paths.\n\n#### patterns\n\nType: `string | string[]`\n\nSee supported `minimatch` [patterns](https://github.com/isaacs/minimatch#usage).\n\n#### options\n\nType: `object`\n\nSee the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones below.\n\n##### expandDirectories\n\nType: `boolean | string[] | object`\\\nDefault: `true`\n\nIf 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:\n\n```js\nimport {globby} from 'globby';\n\nconst paths = await globby('images', {\n\texpandDirectories: {\n\t\tfiles: ['cat', 'unicorn', '*.jpg'],\n\t\textensions: ['png']\n\t}\n});\n\nconsole.log(paths);\n//=> ['cat.png', 'unicorn.png', 'cow.jpg', 'rainbow.jpg']\n```\n\nNote that if you set this option to `false`, you won't get back matched directories unless you set `onlyFiles: false`.\n\n##### gitignore\n\nType: `boolean`\\\nDefault: `false`\n\nRespect ignore patterns in `.gitignore` files that apply to the globbed files.\n\n##### ignoreFiles\n\nType: `string | string[]`\\\nDefault: `undefined`\n\nGlob patterns to look for ignore files, which are then used to ignore globbed files.\n\nThis is a more generic form of the `gitignore` option, allowing you to find ignore files with a [compatible syntax](http://git-scm.com/docs/gitignore). For instance, this works with Babel's `.babelignore`, Prettier's `.prettierignore`, or ESLint's `.eslintignore` files.\n\n### globbySync(patterns, options?)\n\nReturns `string[]` of matching paths.\n\n### globbyStream(patterns, options?)\n\nReturns a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_readable_streams) of matching paths.\n\nFor example, loop over glob matches in a [`for await...of` loop](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of) like this:\n\n```js\nimport {globbyStream} from 'globby';\n\nfor await (const path of globbyStream('*.tmp')) {\n\tconsole.log(path);\n}\n```\n\n### convertPathToPattern(path)\n\nConvert a path to a pattern. [Learn more.](https://github.com/mrmlnc/fast-glob#convertpathtopatternpath)\n\n### generateGlobTasks(patterns, options?)\n\nReturns an `Promise<object[]>` in the format `{patterns: string[], options: Object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages.\n\nNote 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.\n\n### generateGlobTasksSync(patterns, options?)\n\nReturns an `object[]` in the format `{patterns: string[], options: Object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages.\n\nTakes the same arguments as `generateGlobTasks`.\n\n### isDynamicPattern(patterns, options?)\n\nReturns a `boolean` of whether there are any special glob characters in the `patterns`.\n\nNote that the options affect the results.\n\nThis function is backed by [`fast-glob`](https://github.com/mrmlnc/fast-glob#isdynamicpatternpattern-options).\n\n### isGitIgnored(options?)\n\nReturns a `Promise<(path: URL | string) => boolean>` indicating whether a given path is ignored via a `.gitignore` file.\n\nTakes `cwd?: URL | string` as options.\n\n```js\nimport {isGitIgnored} from 'globby';\n\nconst isIgnored = await isGitIgnored();\n\nconsole.log(isIgnored('some/file'));\n```\n\n### isGitIgnoredSync(options?)\n\nReturns a `(path: URL | string) => boolean` indicating whether a given path is ignored via a `.gitignore` file.\n\nTakes `cwd?: URL | string` as options.\n\n\n### isIgnoredByIgnoreFiles(patterns, options?)\n\nReturns a `Promise<(path: URL | string) => boolean>` indicating whether a given path is ignored via the ignore files.\n\nThis is a more generic form of the `isGitIgnored` function, allowing you to find ignore files with a [compatible syntax](http://git-scm.com/docs/gitignore). For instance, this works with Babel's `.babelignore`, Prettier's `.prettierignore`, or ESLint's `.eslintignore` files.\n\nTakes `cwd?: URL | string` as options.\n\n```js\nimport {isIgnoredByIgnoreFiles} from 'globby';\n\nconst isIgnored = await isIgnoredByIgnoreFiles(\"**/.gitignore\");\n\nconsole.log(isIgnored('some/file'));\n```\n\n### isIgnoredByIgnoreFilesSync(patterns, options?)\n\nReturns a `(path: URL | string) => boolean` indicating whether a given path is ignored via the ignore files.\n\nThis is a more generic form of the `isGitIgnoredSync` function, allowing you to find ignore files with a [compatible syntax](http://git-scm.com/docs/gitignore). For instance, this works with Babel's `.babelignore`, Prettier's `.prettierignore`, or ESLint's `.eslintignore` files.\n\nTakes `cwd?: URL | string` as options.\n\n```js\nimport {isIgnoredByIgnoreFilesSync} from 'globby';\n\nconst isIgnored = isIgnoredByIgnoreFilesSync(\"**/.gitignore\");\n\nconsole.log(isIgnored('some/file'));\n```\n\n## Globbing patterns\n\nJust a quick overview.\n\n- `*` matches any number of characters, but not `/`\n- `?` matches a single character, but not `/`\n- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part\n- `{}` allows for a comma-separated list of \"or\" expressions\n- `!` at the beginning of a pattern will negate the match\n\n[Various patterns and expected matches.](https://github.com/sindresorhus/multimatch/blob/main/test/test.js)\n\n## Related\n\n- [multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem\n- [matcher](https://github.com/sindresorhus/matcher) - Simple wildcard matching\n- [del](https://github.com/sindresorhus/del) - Delete files and directories\n- [make-dir](https://github.com/sindresorhus/make-dir) - Make a directory and its parents if needed\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/globby\n","readmeFilename":"readme.md","_rev":"1-08a6679770c62ab964a7f4a6a0148602"}