Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function checkContent(isRichText, value, config = {}) {
const { messages } = isRichText
? alex.text(documentToPlainTextString(value), config)
: alex.markdown(value, config);
return messages;
}
export async function getAlexErrors(input: string): Promise {
const report = alex.text(
input,
await getAlexConfig()
);
const { messages } = report;
return messages.map(message => {
return message.message;
});
}