Skip to content

Easily check American / English spelling differences

License

Notifications You must be signed in to change notification settings

Opteo/american-english

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

american-english

Easily check American / English spelling differences

Installation

$ npm install american-english

Usage

const spelling = require('american-english')

const uk_word = 'colour'
let uk_word_to_american = spelling.toUS(uk_word) // 'color'

const us_word = 'color'
let us_word_to_english = spelling.toUK(us_word) // 'colour'

if(spelling.hasUSDifference('colour')) {
	// Difference between 'colour' found
	console.log(spelling.toUS('colour'))
}

if(spelling.hasUKDifference('color')) {
	// Difference between 'color' found
	console.log(spelling.toUK('color'))
}

Spellings

List obtained from http://www.tysto.com/uk-us-spelling-list.html. Feel free to make a pull request if a spelling difference is not found correctly with this package.

About

Easily check American / English spelling differences

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published