parseCuboidDimsfunction
A cuboid read from 2x3x3, 2×3×3, 2 3 3 or 2,3,3: its dims, or null where it is not one the package makes.
Import it
import { parseCuboidDims } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function parseCuboidDims(text: string): CuboidDims | null
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The text to parse or format. |
Returns
CuboidDims | null
A cuboid read from 2x3x3, 2×3×3, 2 3 3 or 2,3,3: its dims, or null where it is not one the package makes.
Examples
import { parseCuboidDims } from "@johnmorrisdotca/kyuubu/cuboid";
console.log(parseCuboidDims("2x3x3"));[ 2, 3, 3 ]What it prints (run when this page was built)