An open API service indexing awesome lists of open source software.

https://github.com/azer/flat-glob

Return glob applied, flattened and duplicate filtered version of the given list of filenames
https://github.com/azer/flat-glob

Last synced: 11 months ago
JSON representation

Return glob applied, flattened and duplicate filtered version of the given list of filenames

Awesome Lists containing this project

README

          

## flat-glob

Return glob applied, flattened and duplicate filtered version of the given list of filenames

## Install

```bash
$ npm install flat-glob
```

## Usage

```js
flatGlob = require('flat-glob')

flatGlob.sync(['foo.js', 'styles/**/*.css', 'templates/index.html', 'templates/**/*.html'])
// => ['foo.js', 'styles/a.css', 'styles/b.css', 'templates/index.html', 'templates/foo.html', 'templates/bar.html']

flatGlob(['foo.js', 'styles/**/*.css', 'templates/index.html', 'templates/**/*.html'], function (error, files) {
if (error) throw error

files
// => ['foo.js', 'styles/a.css', 'styles/b.css', 'templates/index.html', 'templates/foo.html', 'templates/bar.html']
})
```