{"id":13784039,"url":"https://github.com/retextjs/retext-repeated-words","last_synced_at":"2025-05-07T20:44:49.428Z","repository":{"id":39999730,"uuid":"66092249","full_name":"retextjs/retext-repeated-words","owner":"retextjs","description":"plugin to check for for repeated words","archived":false,"fork":false,"pushed_at":"2023-09-10T15:48:43.000Z","size":112,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-07T20:44:39.543Z","etag":null,"topics":["natural-language","repeat","retext","retext-plugin"],"latest_commit_sha":null,"homepage":"https://unifiedjs.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/retextjs.png","metadata":{"funding":{"github":"unifiedjs","open_collective":"unified"},"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-08-19T15:26:23.000Z","updated_at":"2024-02-19T00:18:29.000Z","dependencies_parsed_at":"2024-01-18T18:33:05.141Z","dependency_job_id":null,"html_url":"https://github.com/retextjs/retext-repeated-words","commit_stats":{"total_commits":86,"total_committers":4,"mean_commits":21.5,"dds":"0.046511627906976716","last_synced_commit":"fe7115719b65bff7124bff0ea45f2c8db9b0ff4b"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-repeated-words","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-repeated-words/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-repeated-words/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-repeated-words/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retextjs","download_url":"https://codeload.github.com/retextjs/retext-repeated-words/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954143,"owners_count":21830895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["natural-language","repeat","retext","retext-plugin"],"created_at":"2024-08-03T19:00:34.721Z","updated_at":"2025-05-07T20:44:49.408Z","avatar_url":"https://github.com/retextjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":["Plugins"],"sub_categories":[],"readme":"# retext-repeated-words\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[retext][]** plugin to check for ~~`for`~~ repeated words.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`unified().use(retextRepeatedWords)`](#unifieduseretextrepeatedwords)\n*   [Messages](#messages)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([retext][]) plugin to check for repeated words.\nFor example, `like like` this.\n\n## When should I use this?\n\nYou can opt-into this plugin when you’re dealing with content that might contain\ngrammar mistakes, and have authors that can fix that content.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install retext-repeated-words\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport retextRepeatedWords from 'https://esm.sh/retext-repeated-words@5'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import retextRepeatedWords from 'https://esm.sh/retext-repeated-words@5?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\nSay our document `example.txt` contains:\n\n```txt\nWell, it it doesn’t have to to be. Like a fish in the\nthe sea.\n```\n\n…and our module `example.js` contains:\n\n```js\nimport {read} from 'to-vfile'\nimport {reporter} from 'vfile-reporter'\nimport {unified} from 'unified'\nimport retextEnglish from 'retext-english'\nimport retextStringify from 'retext-stringify'\nimport retextRepeatedWords from 'retext-repeated-words'\n\nconst file = await unified()\n  .use(retextEnglish)\n  .use(retextRepeatedWords)\n  .use(retextStringify)\n  .process(await read('example.txt'))\n\nconsole.error(reporter(file))\n```\n\n…then running `node example.js` yields:\n\n```txt\nexample.txt\n1:7-1:12  warning Unexpected repeated `it`, remove one occurrence  it  retext-repeated-words\n1:26-1:31 warning Unexpected repeated `to`, remove one occurrence  to  retext-repeated-words\n1:51-2:4  warning Unexpected repeated `the`, remove one occurrence the retext-repeated-words\n\n⚠ 3 warnings\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`retextRepeatedWords`][api-retext-repeated-words].\n\n### `unified().use(retextRepeatedWords)`\n\nCheck for repeated words.\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\nTransform ([`Transformer`][unified-transformer]).\n\n###### Notes\n\n*   Doesn’t warn for certain words which *do* occur twice (`the best exhibition\n    they had had since`)\n*   Doesn’t warn for initialisms (`D. D. will pop up with…`)\n*   Doesn’t warn for capitalised words (`Duran Duran…`)\n\n## Messages\n\nEach message is emitted as a [`VFileMessage`][vfile-message] on `file`, with\n`source` set to `'retext-repeated-words'`, `ruleId` to the normalized word,\n`actual` to both words, and `expected` to suggestions.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `retext-repeated-words@^5`,\ncompatible with Node.js 16.\n\n## Related\n\n*   [`retext-indefinite-article`](https://github.com/retextjs/retext-indefinite-article)\n    — check if indefinite articles are used correctly\n*   [`retext-redundant-acronyms`](https://github.com/retextjs/retext-redundant-acronyms)\n    — check for redundant acronyms\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`retextjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/retextjs/retext-repeated-words/workflows/main/badge.svg\n\n[build]: https://github.com/retextjs/retext-repeated-words/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext-repeated-words.svg\n\n[coverage]: https://codecov.io/github/retextjs/retext-repeated-words\n\n[downloads-badge]: https://img.shields.io/npm/dm/retext-repeated-words.svg\n\n[downloads]: https://www.npmjs.com/package/retext-repeated-words\n\n[size-badge]: https://img.shields.io/bundlejs/size/retext-repeated-words\n\n[size]: https://bundlejs.com/?q=retext-repeated-words\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/retextjs/retext/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[health]: https://github.com/retextjs/.github\n\n[contributing]: https://github.com/retextjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/retextjs/.github/blob/main/support.md\n\n[coc]: https://github.com/retextjs/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[retext]: https://github.com/retextjs/retext\n\n[unified]: https://github.com/unifiedjs/unified\n\n[unified-transformer]: https://github.com/unifiedjs/unified#transformer\n\n[vfile-message]: https://github.com/vfile/vfile-message\n\n[api-retext-repeated-words]: #unifieduseretextrepeatedwords\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-repeated-words","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretextjs%2Fretext-repeated-words","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-repeated-words/lists"}