A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/retextjs/retext-intensify below:

retextjs/retext-intensify: plugin to check for weak and mitigating wording

retext plugin to check for weak and mitigating wording.

This package is a unified (retext) plugin to check for words that are weak: weasels, hedges, and fillers.

You can opt-into this plugin when you’re dealing with content that might contain vague wording, and have authors that can fix that content.

This package is ESM only. In Node.js (version 16+), install with npm:

npm install retext-intensify

In Deno with esm.sh:

import retextIntensify from 'https://esm.sh/retext-intensify@7'

In browsers with esm.sh:

<script type="module">
  import retextIntensify from 'https://esm.sh/retext-intensify@7?bundle'
</script>

Say our document example.txt contains:

Some people say there are quite some
problems, apparently.

…and our module example.js contains:

import {retext} from 'retext'
import retextIntensify from 'retext-intensify'
import {read} from 'to-vfile'
import {reporter} from 'vfile-reporter'

const file = await retext()
  .use(retextIntensify)
  .process(await read('example.txt'))

console.error(reporter(file))

…then running node example.js yields:

example.txt
1:1-1:5   warning Unexpected weasel (vague or ambiguous) word `Some`    weasel retext-intensify
1:13-1:16 warning Unexpected hedge (uncertain or indecisive) word `say` hedge  retext-intensify
1:27-1:32 warning Unexpected weasel (vague or ambiguous) word `quite`   weasel retext-intensify
1:33-1:37 warning Unexpected weasel (vague or ambiguous) word `some`    weasel retext-intensify
2:11-2:21 warning Unexpected filler (meaningless) word `apparently`     filler retext-intensify

⚠ 5 warnings

This package exports no identifiers. The default export is retextIntensify.

unified().use(retextIntensify[, options])

Check for weak and mitigating wording.

Transform (Transformer).

Configuration (TypeScript type).

Each message is emitted as a VFileMessage on file, with source set to 'retext-intensify', ruleId to 'filler', 'hedge', or 'weasel', actual to the unexpected phrase, and expected to an empty array.

This package is fully typed with TypeScript. It exports the additional type Options.

Projects maintained by the unified collective are compatible with maintained versions of Node.js.

When we cut a new major release, we drop support for unmaintained versions of Node. This means we try to keep the current release line, retext-intensify@^7, compatible with Node.js 16.

See contributing.md in retextjs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

MIT © Titus Wormer


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4