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 Dependencies

Install

npm install --save glob-promise

API

var glob = require('glob-promise')

glob(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; //=> []
  });

options

The option object will be directly passed to glob.

License

ISC License © Ahmad Nassri