retext-intensify
!Buildbuild-badgebuild
!Coveragecoverage-badgecoverage
!Downloadsdownloads-badgedownloads
!Sizesize-badgesize
!Sponsorssponsors-badgecollective
!Backersbackers-badgecollective
!Chatchat-badgechatretext plugin to check for weak and mitigating wording.
Contents
* [`unified().use(retextIntensify[, options])`](#unifieduseretextintensify-options)
* [`Options`](#options)
What is this?
This package is a unified (retext) plugin to check for words that are weak: weaselswiki-weasels, hedgeswiki-hedges, and fillerswiki-fillers.When should I use this?
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.Install
This package is ESM onlyesm. In Node.js (version 16+), install with npm:npm install retext-intensify
In Deno with
esm.sh
esmsh:import retextIntensify from 'https://esm.sh/retext-intensify@7'
In browsers with
esm.sh
esmsh:<script type="module">
import retextIntensify from 'https://esm.sh/retext-intensify@7?bundle'
</script>
Use
Say our documentexample.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
API
This package exports no identifiers. The default export isretextIntensify
api-retext-intensify.unified().use(retextIntensify[, options])
Check for weak and mitigating wording.Parameters
options
(Options
api-options, optional)
— configuration
Returns
Transform (Transformer
unified-transformer).Options
Configuration (TypeScript type).Fields
ignore
(Array<string>
, optional)
— phrases *not* to warn about
Messages
Each message is emitted as aVFileMessage
vfile-message 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.Types
This package is fully typed with TypeScript. It exports the additional typeOptions
api-options.Compatibility
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.Related
— check possible insensitive, inconsiderate language
— check passive voice
— check profane and vulgar wording
— list of profane words
— list of hedge words
— list of filler words
— list of weasel words
Contribute
Seecontributing.md
contributing in retextjs/.github
health for ways
to get started.
See support.md
support for ways to get help.This project has a code of conductcoc. By interacting with this repository, organization, or community you agree to abide by its terms.