aboutsummaryrefslogblamecommitdiffhomepage
path: root/src/PursLoader/Glob.js
blob: 960ae9a3d3a8c2017b94d9dffd791b477beeb91b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                      
'use strict';

// module PursLoader.Glob

var glob = require('glob');

var async = require('async');

function globAllFn(patterns, errback, callback) {
  return function(){
    async.map(patterns, glob, function(error, result){
      if (error) errback(new Error(error))();
      else callback(result)();
    });
  };
}

exports.globAllFn = globAllFn;