christophercliff / metalsmith-fingerprint

A fingerprint plugin for Metalsmith
MIT License
28 stars 7 forks source link

odd multimatch pattern #14

Open leviwheatcroft opened 7 years ago

leviwheatcroft commented 7 years ago

here:

        Object.keys(files)
            .filter(function (p) {
                return multimatch(p, options.pattern).length > 0
            })

is there any reason for the extra level of iteration? multimatch returns an array of matches, so a more common implementation would be

Object.keys(multimatch(files, options.pattern))

Maybe this package has switched from minimatch in the past, and is still using the minimatch pattern with multimatch.