fleetOffunction
The fleet an object belongs to, from its name and kind, or undefined.
Import it
import { fleetOf } from "@johnmorrisdotca/chikyu-earth/catalogue";
Definition
function fleetOf(name: string, kind?: ObjectKind): string | undefined
Parameters
| Name | Type | Description |
|---|---|---|
name | string | The object's name as the catalogue writes it, in any case. |
kind (optional) | ObjectKind | undefined | Its kind; a rocket body, debris or unknown object is in no fleet. Left out, the name alone decides. |
Returns
string | undefined
The fleet's id, or undefined when the object belongs to none.
Examples
import { fleetOf } from "@johnmorrisdotca/chikyu-earth/catalogue";
console.log(fleetOf("STARLINK-1007", "PAY"), fleetOf("IRIDIUM 33 DEB", "DEB"), fleetOf("NAVSTAR 48 (USA 151)"), fleetOf("HST"));starlink undefined gps undefinedWhat it prints (run when this page was built)