How to use the alex.text function in alex

To help you get started, we’ve selected a few alex examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github contentful / extensions / marketplace / sensitive-language / src / language-checker.js View on Github external
function checkContent(isRichText, value, config = {}) {
  const { messages } = isRichText
    ? alex.text(documentToPlainTextString(value), config)
    : alex.markdown(value, config);

  return messages;
}
github Skn0tt / alex-browser-extension / src / alex_content_script / alex-errors.ts View on Github external
export async function getAlexErrors(input: string): Promise {
  const report = alex.text(
    input,
    await getAlexConfig()
  );

  const { messages } = report;

  return messages.map(message => {
    return message.message;
  });
}

alex

Catch insensitive, inconsiderate writing

MIT
Latest version published 1 year ago

Package Health Score

64 / 100
Full package analysis

Popular alex functions