function createArrayableGlob(globFn) {
    return (patterns, options) => {
        /** [2] If `patterns` is a string, wraps into an array. */
        patterns = [].concat(patterns);

        const globs = patterns.map((pattern) => globFn(pattern, options));

        return Promise.all(globs).then((files) => {
            return [].concat.apply([], files);
        });
    };
}
Creates a wrapper function for the glob function
to provide support for arrays of patterns.

@param {function} globFn - The glob function.

@returns {GlobFn}