fuf.js
function pglob(pattern, options) {
  return new Promise((resolve, reject) => {
    glob(pattern, options, (error, files) => {
      if (error) {
        return reject(error)
      }
      resolve(files)
    })
  })
}
function pglob(pattern, options) {
  return new Promise((resolve, reject) => {
    glob(pattern, options, (error, files) => {
      if (error) {
        return reject(error)
      }
      resolve(files)
    })
  })
}
function pglob ( pattern , options ) { return new Promise ( ( resolve , reject ) => { glob ( pattern , options , ( error , files ) => { if ( error ) { return reject ( error ) } resolve ( files ) } ) } ) }
Promisify version of glob.

@param {string} pattern The glob pattern.
@param {Object} options The hash of options.

@return {Promise<string[], Error>}
Promisify version of glob .