Reference · Samurai battle banners
samuraiNamefunction
A banner's name, in English or Japanese: whose it was and what it is. Any language tag that starts with ja is Japanese.
Import it
import { samuraiName } from "@johnmorrisdotca/hata/samurai";
Definition
function samuraiName(id: string, lang?: string): string | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | A banner's id, in any case, with or without |
lang (optional) | string |
|
Returns
string | null
The name, or null when the set has no such banner.
Examples
import { samuraiName } from "@johnmorrisdotca/hata/samurai";
console.log(samuraiName("samurai:sanada-rokumonsen")); // "Sanada: the six-coin nobori"
console.log(samuraiName("samurai:sanada-rokumonsen", "ja")); // "真田の六連銭の幟"Sanada: the six-coin nobori
真田の六連銭の幟What it prints (run when this page was built)