sizeOffunction
The width and height of a size.
Import it
import { sizeOf } from "@johnmorrisdotca/suido/levels";
Also exported from: @johnmorrisdotca/suido/levels-info
Definition
function sizeOf(size: string): { width: number; height: number; } | null
Parameters
| Name | Type | Description |
|---|---|---|
size | string | The native widthxheight size string, such as 5x5. |
Returns
{ width: number; height: number; } | null
The parsed positive width and height, or null for an invalid size string.
Examples
import { sizeOf } from "@johnmorrisdotca/suido/levels";
console.log(sizeOf("5x7"));{ width: 5, height: 7 }What it prints (run when this page was built)