Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private extractLUISContent(text: string): Promise {
let parsedContent: any;
const log = false;
const locale = 'en-us';
try {
parsedContent = parseFile(text, log, locale);
} catch (e) {
// nothing to do in catch block
}
if (parsedContent !== undefined) {
return Promise.resolve(parsedContent.LUISJsonStructure);
} else {
return undefined;
}
}
}