glob-promise
Promise version of glob
Last updated 2 years ago by ahmadnassri .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install glob-promise 
SYNC missed versions from official npm registry.

glob-promise version License Build Status Downloads Coverage Status

Promise version of glob

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

Install

# using yarn
$ yarn add glob-promise

# using npm
$ npm install --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.


License: ISC • Copyright: ahmadnassri.com • Github: @ahmadnassri • Twitter: @ahmadnassri

Current Tags

  • 3.4.0                                ...           latest (2 years ago)

13 Versions

  • 3.4.0                                ...           2 years ago
  • 3.3.0                                ...           3 years ago
  • 3.2.0                                ...           3 years ago
  • 3.1.0                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 55
This Week 790
This Month 478
Last Day 127
Last Week 755
Last Month 4,951
Dependencies (1)
Dev Dependencies (1)
Dependents (490)

Copyright 2014 - 2016 © taobao.org |