Reference · Flags a page registers itself
enableFlagsfunction
Switches a registered set off or on without forgetting it: while off, its flags are not found, listed or credited.
Import it
import { enableFlags } from "@johnmorrisdotca/hata/custom";
Definition
function enableFlags(sourceId: string, on?: boolean): boolean
Parameters
| Name | Type | Description |
|---|---|---|
sourceId | string | The set's id. |
on (optional) | boolean |
|
Returns
boolean
true when there was such a set.
Examples
import { enableFlags } from "@johnmorrisdotca/hata/custom";
console.log(enableFlags("no-such-set", false)); // falsefalseWhat it prints (run when this page was built)