Skip to the content

Hata旗

Load a native country or region flag, choose supported framing and keep each drawing’s source, author and licence.

Hata (旗) is Japanese for a flag. About the name

Contents

Reference · Flag source and framing metadata

LicenceKindtype

The kinds of licence a shipped drawing can be under: for a Wikimedia Commons file, as Commons states it, public-domain (PD-… templates: a government work, or a design too simple to be copyrighted), cc0, or cc-by (credit asked; NOTICE.md gives it), or accepted (another licence the maintainer decided to accept, written in the licence's name: Mississippi's "Copyrighted free use"); for a flag set's drawing, mit (the set's notice is in NOTICE.md).

Import it

import type { LicenceKind } from "@johnmorrisdotca/hata/manifest";

Definition

type LicenceKind = "public-domain" | "cc0" | "cc-by" | "accepted" | "mit";

Examples

import { MANIFEST, type LicenceKind } from "@johnmorrisdotca/hata/manifest";

const credit: LicenceKind[] = ["cc-by", "mit"];
console.log(MANIFEST.filter((one) => credit.includes(one.licence.kind)));
[
  {
    code: 'YE',
    source: 'country-flag-icons',
    file: '3x2/YE.svg',
    page: 'https://cdn.jsdelivr.net/npm/country-flag-icons@1.6.20/3x2/YE.svg',
    version: '1.6.20',
    wikidata: 'Q805',
    licence: {
      kind: 'mit',
      name: 'MIT',
      url: 'https://cdn.jsdelivr.net/npm/country-flag-icons@1.6.20/LICENSE'
    },
    author: 'Copyright (c) 2020 @catamphetamine <purecatamphetamine@gmail.com>',
    credit: 'country-flag-icons 1.6.20, https://gitlab.com/catamphetamine/country-flag-icons',
    attributionRequired: true,
    restrictions: [],
    templates: [],
    uploaded: null,
    fetched: '2026-10-09',
    reference: {
      file: 'Flag of Yemen.svg',
      page: 'https://commons.wikimedia.org/wiki/File:Flag_of_Yemen.svg',
      licence: 'CC BY-SA 4.0'
    },
    why: "country-flag-icons 3:2: the same flag as Commons' 3:2, whose file is CC BY-SA 4.0 and cannot ship; flag-icons 4:3 is not the true 3:2; flag-icons 1:1 is not the true 3:2; country-flag-icons 3:2 draws the same flag in 204 bytes; country-flag-icons 1:1 is not the true 3:2; circle-flags draws it round, a framing.",
    sameAs: null,
    width: 512,
    height: 341.33,
    bytes: 219,
    gzip: 168,
    notes: [],
    disputed: false,
    defaultVariant: null,
    variants: [],
    framings: { '4:3': [Object], '1:1': [Object], round: [Object] }
  }
]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hata 1.6.0.