logical.ReadOptionstypeno test imports ittype ReadOptions = { readonly url?: string; readonly host?: string; readonly asset?: string; readonly origin?: string };The facts a reader may need that a text does not say.
Which reader reads a text: by what is in it. A JSON or YAML with openapi or swagger is OpenAPI; a text with type Query or schema {, or a JSON with __schema, is GraphQL; an XML with <manifest is an Android manifest and one with <plist an iOS property list; a PEM with a certificate is a certificate; a text with ss -tuln lines or osquery's rows is listening ports; a text with $ORIGIN or an SOA record is a zone. A certificate is read by the physical layer, which has the cryptography.
import { detectFormat } from "./detect.ts";
detectFormat("a.xml", '<manifest package="a.b"/>'); // "android"logical.ReadOptionstypeno test imports ittype ReadOptions = { readonly url?: string; readonly host?: string; readonly asset?: string; readonly origin?: string };The facts a reader may need that a text does not say.
logical.detectFormatfunctionno test imports itfunction detectFormat(_source: string, text: string): "android" | "certificate" | "dns-zone" | "graphql" | "ios" | "listening-ports" | "openapi" | undefinedThe format of a text, or nothing where none is read.
logical.readTextfunctionno test imports itfunction readText(source: string, text: string, options?: ReadOptions): FoundThe assets and links of a text by its format, or a problem where none is read. A certificate is not read here.
ReadOptionstypeno test imports ittype ReadOptions = { readonly url?: string; readonly host?: string; readonly asset?: string; readonly origin?: string };The facts a reader may need that a text does not say.
detectFormatfunctionfunction detectFormat(_source: string, text: string): "android" | "certificate" | "dns-zone" | "graphql" | "ios" | "listening-ports" | "openapi" | undefinedThe format of a text, or nothing where none is read.
readTextfunctionfunction readText(source: string, text: string, options?: ReadOptions): FoundThe assets and links of a text by its format, or a problem where none is read. A certificate is not read here.