Reference · The <chikyu-earth-realistic> element
readSpeedfunction
A speed attribute: how many seconds pass for each real second.
Import it
import { readSpeed } from "@johnmorrisdotca/chikyu-earth/realistic/element";
Also exported from: @johnmorrisdotca/chikyu-earth/realistic/no-cultures
Definition
function readSpeed(value: string | null): number | null
Parameters
| Name | Type | Description |
|---|---|---|
value | string | null | The attribute's text, or |
Returns
number | null
The speed, or null when the value is empty or not a number (the clock then follows time: real time for "now", held for a date).
Examples
import { readSpeed } from "@johnmorrisdotca/chikyu-earth/realistic/element";
console.log(readSpeed("86400"), readSpeed("-3600"), readSpeed(null));