JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 42547167
  • Score
    100M100P100Q247211F
  • License MIT

Convert directories to glob compatible strings

Package Exports

  • dir-glob

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dir-glob) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

dir-glob Build Status

Convert directories to glob compatible strings

Install

$ npm install --save dir-glob

Usage

const dirGlob = require('dir-glob');

dirGlob(['index.js', 'test.js', 'fixtures']).then(files => {
    console.log(files);
    //=> ['index.js', 'test.js', 'fixtures/**']
});

dirGlob(['lib/**', 'fixtures'], {ext: 'js'}).then(files => {
    console.log(files);
    //=> ['lib/**', 'fixtures/**/*.js']
});

dirGlob(['lib/**', 'fixtures'], {ext: ['js', 'png']}).then(files => {
    console.log(files);
    //=> ['lib/**', 'fixtures/**/*.{js,png}']
});

API

dirGlob(input, [options])

Returns a promise for an array of glob strings.

input

Type: array, string

A string or an array of paths.

options

ext

Type: array , string

Append extension to the end of your glob.

dirGlob.sync(input, [options])

Returns an array of glob strings.

input

Type: array, string

A string or an array of paths.

options

ext

Type: array , string

Append extension to the end of your glob.

License

MIT © Kevin Martensson