it-glob

Async iterable filename pattern matcher

Usage no npm install needed!

<script type="module">
  import itGlob from 'https://cdn.skypack.dev/it-glob';
</script>

README

it-glob

Build status Coverage Status Dependencies Status

Async iterable filename pattern matcher

Like glob but async iterable.

Installation

$ npm install --save it-glob

Usage

const glob = require('it-glob')

const options = {
  cwd // defaults to process.cwd
  absolute // return absolute paths, defaults to false
  nodir // only yield file paths, skip directories

  // all other options are passed to minimatch
}

for await (const path of glob('/path/to/file', '**/*', options)) {
  console.info(path)
}

See the minimatch docs for the full list of options.