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 ensure-oxford-commas with all npm packages installed. Try it out:

var ensureOxfordCommas = require("ensure-oxford-commas")

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

ensure-oxford-commas v0.1.0

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

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!

Metadata

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