hasMatchingExtname = (pathname, exts = []) =>
  exts
    .map(ext => (ext.startsWith('.') ? ext : `.${ext}`))
    .some(ext => pathname.endsWith(ext))
Determines if pathname has a matching file extension.

Supports multi-part extensions.

@private
@param {string} pathname - Pathname to check for match.
@param {string[]} exts - List of file extensions, w/-or-w/o leading period
@return {boolean} `true` if file extension matches.
@example
hasMatchingExtname('foo.html', ['js', 'css']); // false
hasMatchingExtname('foo.js', ['.js']); // true
hasMatchingExtname('foo.js', ['js']); // ture