6.0.5 • Published 8 months ago

glob-promise v6.0.5

Weekly downloads
1,504,905
License
MIT
Repository
github
Last release
8 months ago

Promise version of glob

Match files using the patterns the shell uses, like stars and stuff.

license release semantic

*Note: This is just a Promise wrapped version of glob*

Install

npm install glob-promise glob
NOTE

glob is set as a peerDependency in package.json

  • npm >= 7 will automatically install peerDependencies
  • npm \<= 6 will not automatically install peerDependencies.

You will need to manually add glob as a dependency to your project for glob-promise to work.

API

glob(pattern [, options])

Alias for glob.promise

glob.promise(pattern [, options])

pattern: String (glob pattern) options: Object or String Return: Object (Promise)

When it finishes, it will be fulfilled with an Array of filenames as its first argument.

When it fails to read the files, it will be rejected with an error as its first argument.

glob('**/*')
  .then(function(contents) {
    contents; //=> ['lorem', 'ipsum', 'dolor']
  });

glob('{foo,bar.baz}.txt', { nobrace: true })
  .then(function(contents) {
    contents; //=> []
  });

glob.glob(pattern [, options], cb)

see glob

glob.sync(pattern [, options])

see glob.sync()

glob.hasMagic(pattern, [options])

see glob.hasMagic()

Class: glob.Glob

see Glob

options

The option object will be directly passed to glob.


Author: Ahmad Nassri  Twitter: @AhmadNassri

6.0.5

8 months ago

6.0.4

8 months ago

6.0.3

11 months ago

6.0.2

1 year ago

5.0.1

1 year ago

6.0.1

1 year ago

6.0.0

1 year ago

5.0.0

2 years ago

4.2.2

3 years ago

4.2.1

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.4.0

6 years ago

3.3.0

6 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.0.0

7 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago