readPackedFromfunction
Ask an address for a packed catalogue file once and read it. This is what packedElementsFrom does; use it when a page wants the whole record (kind, owner, launch) and not just the element sets.
Import it
import { readPackedFrom } from "@johnmorrisdotca/chikyu-earth/door";
Definition
function readPackedFrom(url: string, options?: PackedElementsOptions & { signal?: AbortSignal; }): Promise<PackedCatalogue>
Parameters
| Name | Type | Description |
|---|---|---|
url | string | The address of a packed file. |
options (optional) | PackedElementsOptions & { signal?: AbortSignal; } | See |
Returns
Promise<PackedCatalogue>
The file, by column.
Examples
import { readPackedFrom } from "@johnmorrisdotca/chikyu-earth/door";
const file = await readPackedFrom("https://example.org/catalogue/rocket-bodies.pack.gz");
console.log(file.count, file.meta["retrieved"], file.kindAt(0));