@hyperjump/browser
    Preparing search index...

    Class Hyperjump<T>

    Type Parameters

    Index

    Constructors

    Properties

    acceptableMediaTypes: () => string

    Constructs an Accept header based on the registered media types.

    addMediaTypePlugin: <A extends DocumentNode>(plugin: MediaTypePlugin<A>) => void

    Add support for a media tpe. Support for the JRef and JSON media types are enabled by default.

    addUriSchemePlugin: (plugin: UriSchemePlugin) => void

    Add support for a URI scheme. Support for the http(s): and file: URI schemes are enabled by default.

    entries: (node: T) => AsyncGenerator<[string, T], void, unknown>

    Iterate over key/value pairs of an object. It will follow any references it encounters so it always yields JSON compatible values.

    get: (uri: string, options?: GetOptions) => Promise<T>

    Retrieve a document located at the given URI. URIs can be relative if a base URI can be determined. On the server-side, the base URI is the CWD. In browser, the base URI is the URI of the page.

    getMediaType: (uri: string) => string

    Returns the media type of the resource based on its URI. This is usually based on the extension and configured by hyperjump.MediaTypePlugins.

    has: <A>(key: string, node: JsonNode<A>) => boolean
    iter: (node: T) => AsyncGenerator<T, void, unknown>

    Iterate over an array node. It will follow any references it encounters so it always yields JSON compatible values.

    keys: <A>(node: JsonNode<A>) => Generator<string, void, unknown>
    removeMediaTypePlugin: (contentType: string) => void

    This is mostly useful for disabling a scheme that's enabled by default.

    removeUriSchemePlugin: (scheme: string) => void

    This is mostly useful for disabling a scheme that's enabled by default.

    retrieve: (uri: string, options: GetOptions) => Promise<Response>

    Unless you're using it in a UriSchemePlugin.retrieve method, this is not the method you're looking for. It's used internally to fetch a resource before processing it based on its media type. You might use it for implementing hyperjump.UriSchemePlugins for URI schemes that don't have locating semantics (such as urn:) and instead map to another URI where the resource can be retrieved from. See the example in the README.

    setMediaTypeQuality: (contentType: string, quality: number) => void

    Set the quality that will be used in the Accept header of requests to indicate to servers which media types are preferred over others.

    step: (key: string, node: T) => Promise<T>

    This is like indexing into an object or array. It will follow any references it encounters so it always returns a JSON compatible value.

    value: <_A>(node: JsonNullNode) => null & <_A>(node: JsonBooleanNode) => boolean & <
        _A,
    >(
        node: JsonNumberNode,
    ) => number & <_A>(node: JsonStringNode) => string & <A>(
        node: JsonArrayNode<A>,
    ) => Json[] & <A>(node: JsonObjectNode<A>) => Record<string, Json> & <A>(
        node: JsonNode<A>,
    ) => Json
    values: (node: T) => AsyncGenerator<T, void, unknown>

    Iterate over the values of an object. It will follow any references it encounters so it always yields JSON compatible values.