November: Procrastination Month
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

ensure-oxford-commas

0.1.0 • Public • Published

ensure-oxford-commas

npm travis-status

Ensure or discover if Oxford commas are being used in English language text.

Install

> npm install ensure-oxford-commas

Usage

import { ensureOxfordCommas, isMissingOxfordCommas } from 'ensure-oxford-commas';
 
ensureOxfordCommas('Please choose between red, green and blue.');  // throws
ensureOxfordCommas('Please choose between red, green, and blue.'); // does not throw
 
isMissingOxfordCommas('Please choose between red, green and blue.');  // true
isMissingOxfordCommas('Please choose between red, green, and blue.'); // false

Author

Ken Dale

License

MIT

Contributions

They're welcome! Open an issue or send a pull request!

install

npm i ensure-oxford-commas

Downloadsweekly downloads

4

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability