Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
retext-repeated-words
Advanced tools
retext plugin to check for repeated words.for
This package is ESM only:
Node 12+ is needed to use it and it must be import
ed instead of require
d.
npm:
npm install retext-repeated-words
Say we have the following file, example.txt
:
Well, it it doesn’t have to to be. Like a fish in the
the sea.
…and our script, example.js
, looks like this:
import {readSync} 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 = readSync('example.txt')
unified()
.use(retextEnglish)
.use(retextRepeatedWords)
.use(retextStringify)
.process(file)
.then((file) => {
console.error(reporter(file))
})
Now, running node example
yields:
example.txt
1:7-1:12 warning Expected `it` once, not twice it retext-repeated-words
1:26-1:31 warning Expected `to` once, not twice to retext-repeated-words
1:51-2:4 warning Expected `the` once, not twice the retext-repeated-words
⚠ 3 warnings
This package exports no identifiers.
The default export is retextRepeatedWords
.
unified().use(retextRepeatedWords)
Check for repeated words.
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 the
following fields:
message.source
Name of this plugin ('retext-repeated-words'
).
message.ruleId
Repeated word (normalized) (string
, such as the
).
message.actual
Current not ok phrase (string
).
message.expected
List of suggestions (Array.<string>
, such as ['the']
).
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
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.