src/metalsmith-replace.js
function filenameExtensionFilter (ext) {
  if (typeof ext === 'string') {
    return (_, path) => path.endsWith('.' + ext);
  } else if (ext instanceof Array) {
    return ext
      .map(filenameExtensionFilter)
      .reduce(pcomp);
  }
}
function filenameExtensionFilter (ext) {
  if (typeof ext === 'string') {
    return (_, path) => path.endsWith('.' + ext);
  } else if (ext instanceof Array) {
    return ext
      .map(filenameExtensionFilter)
      .reduce(pcomp);
  }
}
function filenameExtensionFilter ( ext ) { if ( typeof ext === 'string' ) { return ( _ , path ) => path . endsWith ( '.' + ext ) ; } else if ( ext instanceof Array ) { return ext . map ( filenameExtensionFilter ) . reduce ( pcomp ) ; } }
return a predicate which matches files with the given extension(s);
return a predicate which matches files with the given extension ( s ) ;