Skip to content
1 min read · 108 words

@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

VariableDescription
tesseractJsOcrOptionsSchemaValidator schema for TesseractJsOcrAdapterOptions. Rejects unknown top-level keys.

Functions

FunctionDescription
validateOptionsValidates an arbitrary input against tesseractJsOcrOptionsSchema.