code: function isTemplate (file, format) {
    const { prefix, ext } = splitFormat(format);
    return formatMap[ext]
      .map(e => (prefix.length ? '.' : '') + prefix + e)
      .some(e => file.endsWith(e));
  }
docs: test if a given file could serve as a template for the format