LicenceKind型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 type { LicenceKind } from "@johnmorrisdotca/hata/manifest";
定義
type LicenceKind = "public-domain" | "cc0" | "cc-by" | "accepted" | "mit";
例
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] }
}
]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。