1234567891011121314151617181920212223242526 |
- 'use strict';
- const globAsync = require('./glob-async');
- module.exports = function getPathsAsync(patterns, config) {
-
- const {ignore, disableGlobs, allowEmptyPaths, glob: cfg} = config;
-
- if (disableGlobs) {
- return Promise.resolve(patterns);
- }
-
- return Promise
- .all(patterns
- .map(pattern => globAsync(pattern, ignore, allowEmptyPaths, cfg)))
- .then(paths => [].concat.apply([], paths));
- };
|