Reference · Draw a bracket, a table or a road to the final
judoSecondsfunction
A time as seconds: a number, or "m:ss".
Import it
import { judoSeconds } from "@johnmorrisdotca/taisen-brackets";
Definition
function judoSeconds(time: number | string | undefined): number | null
Parameters
| Name | Type | Description |
|---|---|---|
time | string | number | undefined | A number of seconds, or text such as |
Returns
number | null
The seconds; null when there is no time. Text that is not a time throws a RangeError.
Examples
import { judoSeconds } from "@johnmorrisdotca/taisen-brackets";
console.log(judoSeconds("4:00"), judoSeconds(72), judoSeconds(undefined));240 72 nullWhat it prints (run when this page was built)