
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
retext-repeated-words
Advanced tools
retext plugin to check for repeated words.for
This package is a unified (retext) plugin to check for repeated words.
For example, like like
this.
You can opt-into this plugin when you’re dealing with content that might contain grammar mistakes, and have authors that can fix that content.
This package is ESM only. In Node.js (version 16+), install with npm:
npm install retext-repeated-words
In Deno with esm.sh
:
import retextRepeatedWords from 'https://esm.sh/retext-repeated-words@5'
In browsers with esm.sh
:
<script type="module">
import retextRepeatedWords from 'https://esm.sh/retext-repeated-words@5?bundle'
</script>
Say our document example.txt
contains:
Well, it it doesn’t have to to be. Like a fish in the
the sea.
…and our module example.js
contains:
import {read} from 'to-vfile'
import {reporter} from 'vfile-reporter'
import {unified} from 'unified'
import retextEnglish from 'retext-english'
import retextStringify from 'retext-stringify'
import retextRepeatedWords from 'retext-repeated-words'
const file = await unified()
.use(retextEnglish)
.use(retextRepeatedWords)
.use(retextStringify)
.process(await read('example.txt'))
console.error(reporter(file))
…then running node example.js
yields:
example.txt
1:7-1:12 warning Unexpected repeated `it`, remove one occurrence it retext-repeated-words
1:26-1:31 warning Unexpected repeated `to`, remove one occurrence to retext-repeated-words
1:51-2:4 warning Unexpected repeated `the`, remove one occurrence the retext-repeated-words
⚠ 3 warnings
This package exports no identifiers.
The default export is retextRepeatedWords
.
unified().use(retextRepeatedWords)
Check for repeated words.
There are no parameters.
Transform (Transformer
).
the best exhibition they had had since
)D. D. will pop up with…
)Duran Duran…
)Each message is emitted as a VFileMessage
on file
, with
source
set to 'retext-repeated-words'
, ruleId
to the normalized word,
actual
to both words, and expected
to suggestions.
This package is fully typed with TypeScript. It exports no additional types.
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-repeated-words@^5
,
compatible with Node.js 16.
retext-indefinite-article
— check if indefinite articles are used correctlyretext-redundant-acronyms
— check for redundant acronymsSee 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.
FAQs
retext plugin to check for for repeated words
The npm package retext-repeated-words receives a total of 22,749 weekly downloads. As such, retext-repeated-words popularity was classified as popular.
We found that retext-repeated-words demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.