medievalIdfunction
The id of a banner from an id written loosely: either case, with spaces around it, with or without med:.
Import it
import { medievalId } from "@johnmorrisdotca/hata/medieval";
Definition
function medievalId(input: string): MedievalId | null
Parameters
| Name | Type | Description |
|---|---|---|
input | string | "red-cross", " MED:Red-Cross ". |
Returns
MedievalRecordId | null
The id as this package writes it, or null when the set has no such banner.
Examples
import { medievalId } from "@johnmorrisdotca/hata/medieval";
console.log(medievalId(" GB-White-Ensign ")); // "med:red-cross"
console.log(medievalId("nobody")); // nullnull
nullWhat it prints (run when this page was built)