UNPKG

rechtspraak-nl

Version:

Utility functions for consuming Rechtspraak.nl open data for Dutch court judgments and generating well-formed linked data

27 lines (26 loc) 2.07 kB
import { Date, DateTime, UriWithProtocol } from "../model/rechtspraak_metadata"; export declare const REGEX_DCTERMS: RegExp; export declare const REGEX_URI: RegExp; export declare const REGEX_PSI_RECHTSPRAAK: RegExp; export declare const HTTPS_DEEPLINK_RECHTSPRAAK_ID = "http://deeplink.rechtspraak.nl/uitspraak?id="; export declare const HTTPS_RECHTSPRAAK_LAWREADER = "https://rechtspraak.lawreader.nl/"; export declare const HTTPS_ID_LAWREADER = "https://id.lawreader.nl/"; export declare const HTTPS_RECHTSPRAAK_LAWREADER_VOCAB: string; export declare const REGEX_HTTPS: RegExp; export declare const REGEX_JURICONNECT: RegExp; export declare const REGEX_CVDR: RegExp; export declare const REGEX_ECLI: RegExp; export declare const REGEX_STANDAARDEN_OVERHEID: RegExp; export declare function throwIfContainsUnexpectedEncodedChars(str: string, id?: string): string; export declare function throwIfNotArray(array: any, name?: string, id?: string): any[]; export declare function throwIfNotExactlyXAreTruthy(x: number, ...things: any[]): boolean; export declare function throwIfNotString(str: any, extra?: string, ...extras: string[]): string; export declare function throwIfNotDate(str: any, extra?: string, ...extras: string[]): Date; export declare function unexpectedUri(k: string, uri: string, label: string, ecli?: string): string; export declare function throwIfDivergentLabel(key: string, label: string, contextLabel: string): void; export declare function throwIfNotDateTime(str: any, extra?: string, ...extras: string[]): DateTime; export declare function throwIfNotUriWithProtocol(str: any, extra?: string, ...extras: string[]): UriWithProtocol; export declare function isStringArray(x: string | string[]): x is string[]; export declare function matchesAny(val: string, ...regexes: RegExp[]): boolean; export declare function mustHaveTextAndAttributes(object: any, mustHaveText: boolean, ...attrs: (string | string[])[]): void; export declare function mustHaveTextAndAtLeastAttributes(object: any, ...attrs: (string | string[])[]): void;