Reference · The realistic Earth's pure parts
readCityNamesfunction
Reads the city-names attribute: absent is off, bare is 24 names, a number is that many names (1 to 80).
Import it
import { readCityNames } from "@johnmorrisdotca/chikyu-earth/realistic";
Definition
function readCityNames(value: string | null): number | null
Parameters
| Name | Type | Description |
|---|---|---|
value | string | null | The attribute's value, or |
Returns
number | null
How many names at most, or null for none.
Examples
import { readCityNames } from "@johnmorrisdotca/chikyu-earth/realistic";
console.log(readCityNames(null), readCityNames(""), readCityNames("12"), readCityNames("500"), readCityNames("many"));null 24 12 80 24What it prints (run when this page was built)