1 # dir-glob [![Build Status](https://travis-ci.org/kevva/dir-glob.svg?branch=master)](https://travis-ci.org/kevva/dir-glob)
3 > Convert directories to glob compatible strings
16 const dirGlob = require('dir-glob');
18 dirGlob(['index.js', 'test.js', 'fixtures']).then(files => {
20 //=> ['index.js', 'test.js', 'fixtures/**']
23 dirGlob(['index.js', 'inner_folder'], {
27 //=> ['index.js', 'inner_folder/**']
30 dirGlob(['lib/**', 'fixtures'], {
31 files: ['test', 'unicorn']
35 //=> ['lib/**', 'fixtures/**/test.js', 'fixtures/**/unicorn.js']
38 dirGlob(['lib/**', 'fixtures'], {
39 files: ['test', 'unicorn', '*.jsx'],
40 extensions: ['js', 'png']
43 //=> ['lib/**', 'fixtures/**/test.{js,png}', 'fixtures/**/unicorn.{js,png}', 'fixtures/**/*.jsx']
50 ### dirGlob(input, [options])
52 Returns a `Promise` for an array of glob strings.
54 ### dirGlob.sync(input, [options])
56 Returns an array of glob strings.
60 Type: `Array` `string`
62 A `string` or an `Array` of paths.
70 Append extensions to the end of your globs.
76 Only glob for certain files.
82 Test in specific directory.
87 MIT © [Kevin Mårtensson](https://github.com/kevva)