UNPKG

@httpland/range-request-middleware

Version:
17 lines (16 loc) 810 B
import { ContentRange, type Token } from "./deps.js"; export declare const enum RangeUnit { Bytes = "bytes", None = "none" } /** Shallow merge two headers. */ export declare function shallowMergeHeaders(left: Headers, right: Headers): Headers; export declare class RequestedRangeNotSatisfiableResponse extends Response { constructor(contentRange: ContentRange, init?: Omit<ResponseInit, "status"> | undefined); } /** Whether the inputs are equal to case sensitivity. */ export declare function equalsCaseInsensitive(left: string, right: string): boolean; /** Whether the input has {@link Token} or not. * If the input is invalid [`Accept-Ranges`](https://www.rfc-editor.org/rfc/rfc9110.html#section-14.3-2) then `false`. */ export declare function hasToken(input: string, token: Token): boolean;