UNPKG

@cto.af/ucd

Version:

Download, cache, and parse files from the Unicode Character Database (UCD).

30 lines (28 loc) 668 B
interface Points { points: number[]; } interface Range { range: [first: number, last: number]; } type CodePoints = Points | Range; type Field = CodePoints | string | null; interface Entry { fields: Field[]; property?: string; segment?: string; comment?: string; missing?: boolean; } interface FieldDef { word: string; definition: string; } declare class UCDFile { date: Date; name: string; version: number[]; fields: (FieldDef | undefined)[]; entries: Entry[]; [Symbol.iterator](): ArrayIterator<Entry>; } export { type CodePoints, type Entry, type Field, type FieldDef, type Points, type Range, UCDFile };