Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setLanguageHints(hintedLanguages) {
// quick check the first entry is a string only
if (!isArray(hintedLanguages) || !hintedLanguages.length || !isString(hintedLanguages[0])) {
throw new Error(
`firebase.mlKitVision() VisionCloudTextRecognizerOptions.setLanguageHints(*) 'hintedLanguages' must be an non empty array of strings.`,
);
}
return this.set('hintedLanguages', hintedLanguages);
}
}