4.0.5 • Published 7 years ago

retext-18f-simplify v4.0.5

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

retext-simplify Build Status Coverage Status

Check phrases for simpler alternatives with retext.

Installation

npm:

npm install retext-simplify

Usage

var retext = require('retext');
var simplify = require('retext-simplify');
var report = require('vfile-reporter');

retext()
  .use(simplify)
  .process([
    'You can utilize a shorter word.',
    'Be advised, don’t do this.',
    'That’s the appropriate thing to do.'
  ].join('\n'), function (err, file) {
      console.error(report(err || file));
  });

Yields:

   1:9-1:16  warning  Replace “utilize” with “use”                                utilize      retext-simplify
   2:1-2:11  warning  Remove “Be advised”                                         be-advised   retext-simplify
  3:12-3:23  warning  Replace “appropriate” with “proper”, “right”, or remove it  appropriate  retext-simplify

⚠ 3 warnings

API

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

Check phrases for simpler alternatives.

options
  • ignore (Array.<string>) — phrases not to warn about.

License

MIT © Titus Wormer