JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3656768
  • Score
    100M100P100Q202376F
  • License ISC

Promise version of glob

Package Exports

  • glob-promise

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 (glob-promise) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

glob-promise version License

Promise version of glob

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

Build Status Downloads Code Climate Coverage Status Dependency Status Dependencies

Install

# using yarn
$ yarn add glob-promise

# using npm
$ npm install --only=production --save glob-promise
NOTE:

glob is set as a peerDependency in package.json

  • npm <= 2 will automatically install peerDependencies if they are not explicitly depended upon higher in the dependency tree.
  • npm >= 3 will no longer 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.


©️ ahmadnassri.com  ·  License: ISC  ·  Github: @ahmadnassri  ·  Twitter: @ahmadnassri