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 · Samurai battle banners

samuraiAspectfunction

A banner's width over its height, from its viewBox: 0.25 for a nobori. For keeping a box before the picture is drawn.

Import it

import { samuraiAspect } from "@johnmorrisdotca/hata/samurai";

Definition

function samuraiAspect(id: string): number | null

Parameters

NameTypeDescription
idstring

A banner's id, in any case, with or without samurai:.

Returns

number | null

The aspect ratio, or null when the set has no such banner.

Examples

import { samuraiAspect } from "@johnmorrisdotca/hata/samurai";

console.log(samuraiAspect("samurai:sanada-rokumonsen")); // 0.25
0.25

What it prints (run when this page was built)

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