UNPKG

@amjur/courts-db-ts

Version:

TypeScript port of the Python courts-db library for legal court identification

40 lines (39 loc) 1.31 kB
import type { Courts, Court, CourtDict, CompiledRegexes, FindCourtByDateOptions } from './types.js'; /** * Get courts data (lazy loaded) */ declare function getCourts(): Courts; /** * Get court dictionary (lazy loaded) */ declare function getCourtDict(): CourtDict; /** * Get compiled regexes (lazy loaded) */ declare function getRegexes(): Promise<CompiledRegexes>; /** * Find court IDs with our courts-db regex list */ export declare function findCourtIdsByName(courtStr: string, bankruptcy?: boolean | null, location?: string | null, allowPartialMatches?: boolean): Promise<string[]>; /** * Filter courts by date */ export declare function filterCourtsByDate(courtIds: string[], date?: Date | null): string[]; /** * Filter courts by bankruptcy */ export declare function filterCourtsByBankruptcy(courtIds: string[], bankruptcy?: boolean | null): string[]; /** * Find court by ID */ export declare function findCourtById(courtId: string): Court[]; /** * Find court with comprehensive filtering */ export declare function findCourt(courtStr: string, options?: FindCourtByDateOptions): Promise<string[]>; export { getCourts as courts }; export { getCourtDict as courtDict }; export { getRegexes as regexes }; export * from './types.js'; export * from './text-utils.js'; export * from './utils.js';