@nhtio/adk/batteries/specialists/ocr/tesseract_js/validation
Runtime validation schema and wrapper for tesseract.js OCR adapter options.
Remarks
Validates TesseractJsOcrAdapterOptions at construction time. Throws E_INVALID_TESSERACT_JS_OCR_OPTIONS on failure. languages is required and must be a non-empty array of strings — language packs download on first use, so a missing/empty value fails loud rather than silently picking a default; unknown top-level keys are rejected so typos fail loud.
Variables
| Variable | Description |
|---|---|
| tesseractJsOcrOptionsSchema | Validator schema for TesseractJsOcrAdapterOptions. Rejects unknown top-level keys. |
Functions
| Function | Description |
|---|---|
| validateOptions | Validates an arbitrary input against tesseractJsOcrOptionsSchema. |