/**
 * Returns matches a glob pattern or not
 * @function lib.file.matchesGlob
 * @param {string} filename - Filename.
 * @param {string} pattern - Pattern to match.
 * @author Taka okunishi
 *
 */
module.exports = function (filename, pattern) {
    var minimatch = require("minimatch");
    pattern = [].concat(pattern);
    for (var i = 0; i < pattern.length; i++) {
        var hit = minimatch(filename, pattern[i]);
        if (hit) return true;
    }
    return false;
};