glob-extra
TypeScript icon, indicating that this package has built-in type declarations

5.0.2 • Public • Published

glob-extra

Wrapper for utility fast-glob with promises support which provides expanding of masks, dirs and files to absolute file paths.

NPM version Build Status Coverage Status Dependency Status

Installation

$ npm install glob-extra

Usage

const globExtra = require('glob-extra');
const paths = ['some/path', 'other/path/*.js', 'other/deep/path/**/*.js']

// options are optional
globExtra.expandPaths(paths, options)
    .then((files) => {
        // ['/absolute/some/path/file1.js',
        // '/absolute/other/path/file2.js',
        // '/absolute/other/deep/path/dir/file3.js']
    })
    .done();

Options

  • formats {String[]} – files formats to expand; it will expand all files by default. For example:
globExtra.expandPaths(paths, {formats: ['.txt', '.js']})
    .then((files) => {
        // will expand only js and txt files
    })
    .done();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 5.0.2
    1,527
    • latest

Version History

Package Sidebar

Install

npm i glob-extra

Weekly Downloads

1,656

Version

5.0.2

License

MIT

Unpacked Size

19.9 kB

Total Files

23

Last publish

Collaborators

  • j0tunn
  • gavryushin
  • dudagod
  • sipayrt
  • rostik404
  • dmitriy96
  • xrsd
  • oldskytree