You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
213
+
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
214
+
@returns A filter function indicating whether a given path is ignored via the ignore files.
215
+
216
+
This 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.
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
236
+
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
237
+
@returns A filter function indicating whether a given path is ignored via the ignore files.
238
+
239
+
This 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.
240
+
241
+
@see {@link isIgnoredByIgnoreFiles}
242
+
243
+
@example
244
+
```
245
+
import {isIgnoredByIgnoreFilesSync} from 'globby';
Copy file name to clipboardExpand all lines: readme.md
+33
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,39 @@ Returns a `(path: URL | string) => boolean` indicating whether a given path is i
157
157
158
158
Takes `cwd?: URL | string` as options.
159
159
160
+
161
+
### isIgnoredByIgnoreFiles(patterns, options?)
162
+
163
+
Returns a `Promise<(path: URL | string) => boolean>` indicating whether a given path is ignored via the ignore files.
164
+
165
+
This 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.
Returns a `(path: URL | string) => boolean` indicating whether a given path is ignored via the ignore files.
180
+
181
+
This 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.
0 commit comments