Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

retext-repeated-words

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retext-repeated-words - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

28

package.json
{
"name": "retext-repeated-words",
"version": "1.2.0",
"version": "1.2.1",
"description": "Check for for repeated words",

@@ -12,2 +12,9 @@ "license": "MIT",

],
"repository": "wooorm/retext-repeated-words",
"bugs": "https://github.com/wooorm/retext-repeated-words/issues",
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)",
"Sylvan Swierkosz <sswierkosz@gmail.com>"
],
"files": [

@@ -21,9 +28,2 @@ "index.js"

},
"repository": "https://github.com/wooorm/retext-repeated-words",
"bugs": "https://github.com/wooorm/retext-repeated-words/issues",
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)",
"Sylvan Swierkosz <sswierkosz@gmail.com>"
],
"devDependencies": {

@@ -34,6 +34,6 @@ "browserify": "^14.1.0",

"remark-cli": "^3.0.0",
"remark-preset-wooorm": "^2.0.0",
"remark-preset-wooorm": "^3.0.0",
"retext": "^5.0.0",
"tape": "^4.0.0",
"xo": "^0.17.1"
"xo": "^0.18.0"
},

@@ -58,2 +58,6 @@ "scripts": {

"space": true,
"esnext": false,
"rules": {
"no-multi-assign": "off"
},
"ignores": [

@@ -64,4 +68,6 @@ "retext-repeated-words.js"

"remarkConfig": {
"plugins": ["preset-wooorm"]
"plugins": [
"preset-wooorm"
]
}
}

@@ -15,22 +15,35 @@ # retext-repeated-words [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]

Say we have the following file, `example.txt`:
```text
Well, it it doesn’t have to to be. Like a fish in the
the sea.
```
And our script, `example.js`, looks like this:
```javascript
var retext = require('retext');
var vfile = require('to-vfile');
var report = require('vfile-reporter');
var unified = require('unified');
var english = require('retext-english');
var stringify = require('retext-stringify');
var repeated = require('retext-repeated-words');
var report = require('vfile-reporter');
retext().use(english).use(repeated).process([
'Well, it it doesn’t have to to be. Like a fish in the',
'the sea.'
].join('\n'), function (err, file) {
console.log(report(err || file));
});
unified()
.use(english)
.use(repeated)
.use(stringify)
.process(vfile.readSync('example.txt'), function (err, file) {
console.error(report(err || file));
});
```
Yields:
Now, running `node example` yields:
```text
1:7-1:12 warning Expected `it` once, not twice retext-repeated-words
1:26-1:31 warning Expected `to` once, not twice retext-repeated-words
1:51-2:4 warning Expected `the` once, not twice retext-repeated-words
example.txt
1:7-1:12 warning Expected `it` once, not twice retext-repeated-words retext-repeated-words
1:26-1:31 warning Expected `to` once, not twice retext-repeated-words retext-repeated-words
1:51-2:4 warning Expected `the` once, not twice retext-repeated-words retext-repeated-words

@@ -47,6 +60,13 @@ ⚠ 3 warnings

* Doesn’t warn for some words which _do_ occur twice (`the best
exhibition they had had since`);
* Doesn’t warn for initialisms (`D. D. will pop up with...`);
* Doesn’t warn for capitalised words (`Duran Duran...`).
exhibition they had had since`)
* Doesn’t warn for initialisms (`D. D. will pop up with...`)
* Doesn’t warn for capitalised words (`Duran Duran...`)
## Related
* [`retext-indefinite-article`](https://github.com/wooorm/retext-indefinite-article)
— Check if indefinite articles are used correctly
* [`retext-redundant-acronyms`](https://github.com/wooorm/retext-redundant-acronyms)
— Check for redundant acronyms
## License

@@ -53,0 +73,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc