Reference · Flags a page registers itself
customIdfunction
A custom flag's id, from one written loosely (either case, spaces around it) and registered: "custom:harbour-fc". The custom: may not be left off, so a bare code is never read as one.
Import it
import { customId } from "@johnmorrisdotca/hata/custom";
Definition
function customId(input: string): string | null
Parameters
| Name | Type | Description |
|---|---|---|
input | string | An id, in any case. |
Returns
string | null
The id as registered, or null when it is none or is not registered (or its set is off).
Examples
import { customId } from "@johnmorrisdotca/hata/custom";
console.log(customId(" CUSTOM:Nothing-here ")); // null: nothing registerednullWhat it prints (run when this page was built)