Reference · Rockets, variants, parts and the fit check
rocketFromParamsfunction
The options a query names.
Import it
import { rocketFromParams } from "@johnmorrisdotca/uchusen-rockets";
Definition
function rocketFromParams(params: URLSearchParams): RocketOptions
Parameters
| Name | Type | Description |
|---|---|---|
params | URLSearchParams | The query of an |
Returns
RocketOptions
The choices the query names.
Examples
import { rocketFromParams } from "@johnmorrisdotca/uchusen-rockets";
console.log(rocketFromParams(new URLSearchParams("rocket=falcon-9&look=thick")));{ rocket: 'falcon-9', look: 'thick' }What it prints (run when this page was built)