Reference · The globe as an SVG string
cleanStylefunction
A value from outside (an attribute, a query parameter) as a style's name: the default for anything else.
Import it
import { cleanStyle } from "@johnmorrisdotca/chikyu-earth";
Definition
function cleanStyle(value: unknown): StyleName
Parameters
| Name | Type | Description |
|---|---|---|
value | unknown | Anything. |
Returns
"line" | "thick"
A valid style name; DEFAULT_STYLE when value names none.
Examples
import { cleanStyle } from "@johnmorrisdotca/chikyu-earth";
console.log(cleanStyle("thick"), cleanStyle("neon"), cleanStyle(null));thick line lineWhat it prints (run when this page was built)