Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Type Alias DictionaryOptions

    what spoolProxy({ dictionary }) takes

    type DictionaryOptions = {
        base?: RegExp | readonly RegExp[] | ((pathname: string) => boolean);
        cacheBytes?: number;
        encoder: DictionaryEncoder;
        formats?: readonly DictionaryFormat[];
        match?: RegExp;
        maxBytes?: number;
    }
    Index
    base?: RegExp | readonly RegExp[] | ((pathname: string) => boolean)

    Which of those responses register as dictionaries, as a function of the pathname, a regular expression or a list of them; default every one match accepts. The others get no Use-As-Dictionary, so the browser holds only the bases you name, and they are still encoded against a base the request names.

    cacheBytes?: number

    bytes of dictionaries kept in memory, the least recently used going first; default 16 MiB

    produces the compressed stream; see DictionaryEncoder

    formats?: readonly DictionaryFormat[]

    the codings offered, in order of preference, when the request accepts them; default ['dcz']

    match?: RegExp

    the paths that become and use dictionaries, tested against the pathname; default /\.(?:css|m?js)$/i

    maxBytes?: number

    largest body kept as a dictionary or encoded, in bytes; default 2 MiB