UNPKG

@web3-storage/parse-link-header

Version:

Parses a link header and returns paging information for each contained link.

19 lines (14 loc) 373 B
export interface Link { url: string; rel: string; [queryParam: string]: string; } export interface Links { [rel: string]: Link; } export interface Options { maxHeaderLength?: number throwOnMaxHeaderLengthExceeded?: boolean } declare function parseLinkHeader(linkHeader: string | null | undefined, options?: Options): Links | null export { parseLinkHeader }