https://github.com/opteo/american-english
Easily check American / English spelling differences
https://github.com/opteo/american-english
Last synced: about 1 year ago
JSON representation
Easily check American / English spelling differences
- Host: GitHub
- URL: https://github.com/opteo/american-english
- Owner: Opteo
- License: mit
- Created: 2016-10-18T13:42:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-23T15:15:53.000Z (over 9 years ago)
- Last Synced: 2025-01-29T07:30:31.909Z (over 1 year ago)
- Language: JavaScript
- Size: 27.3 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# american-english
Easily check American / English spelling differences
### Installation
```bash
$ npm install american-english
```
### Usage
```javascript
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](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.