Skip to content

adamhollett/retext-usage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

retext-usage

Check phrases for incorrect English usage with retext.

Usage

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

retext()
    .use(usage)
    .process([
        'Repeat ad nauseum.',
        'Get some money from the ATM machine.',
        'This is majorly inappropriate.'
    ].join('\n'), function (err, file) {
        console.log(report(file));
    });

Yields:

<stdin>
   1:8-1:18  warning  Replace “ad nauseum” with “ad nauseam”                      ad nauseum
  2:25-2:36  warning  Replace “ATM machine“ with “ATM”                            ATM machine
   3:9-3:16  warning  Replace “majorly” with “extremely”, or remove it            majorly

⚠ 3 warnings

License

MIT © Adam Hollett

About

Warn about incorrect English usage with retext

Resources

License

Stars

Watchers

Forks

Packages

No packages published