Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including retext-equality with all npm packages installed. Try it out:

var retextEquality = require("retext-equality")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

retext-equality v5.0.0

retext plugin to warn about possible insensitive, inconsiderate language


Build Coverage Downloads Size Sponsors Backers Chat

retext plugin to check for possible insensitive, inconsiderate language.



npm install retext-equality


Say we have the following file, example.txt:

He’s pretty set on beating your butt for sheriff.

…and our script, example.js, looks like this:

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 equality = require('retext-equality')

  .process(vfile.readSync('example.txt'), function(err, file) {
    console.error(report(err || file))

Now, running node example yields:

  1:1-1:5  warning  `He’s` may be insensitive, use `They`, `It` instead  he-she  retext-equality

⚠ 1 warning


retext().use(equality[, options])

Check for possible insensitive, inconsiderate language.


List of phrases not to warn about (Array.<string>).


Do not allow binary references (boolean, default: false). By default he is warned about unless it’s followed by something like or she or and she. When noBinary is true, both cases would be warned about.


See for a list of rules and how rules work.

Each message is emitted as a VFileMessage on file, with the following fields:


Name of this plugin ('retext-equality').


See id in


Current not ok phrase (string).


Suggest ok phrase (Array.<string>).


Extra information, when available (string?).



See in retextjs/.github for ways to get started. See for ways to get help.

To create new patterns, add them in the YAML files in the data/ directory, and run npm install and then npm test to build everything. Please see the current patterns for inspiration. New English rules will be automatically added to

Once you are happy with the new rule, add a test for it in test.js and open a Pull Request.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.


MIT © Titus Wormer


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free