globbie
Version:
Simple directory globbing using picomatch
23 lines (16 loc) • 578 B
Markdown
A simple directory glob matcher using picomatch
```js
const Globbie = require('globbie')
const pattern = 'src/**/*.js'
const globbie = new Globbie(pattern)
await globbie.match() // => ['src/index.js', 'src/utils/index.js', ...]
const globbieSync = new Globbie(pattern, { sync: true })
globbie.match() // => ['src/index.js', 'src/utils/index.js', ...]
```
The following options are available to be set in the `options` object:
- `sync` (boolean, default: `false`): Whether to use async or sync methods when running match
Apache-2.0