Skip to content
An array of ~275,000 English words derived from the Letterpress word list. Works with Node and Browserify.
JavaScript
Branch: master
Clone or download
Latest commit 3931e32 Sep 23, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
corpus fuckton (#6) Sep 3, 2017
.npmignore more words, build process, test suite Dec 16, 2016
.travis.yml chore: set up semantic-release Aug 21, 2017
build.js more words, build process, test suite Dec 16, 2016
cli.js Removed trailing slash Jun 12, 2016
package.json fix: use new repo url Sep 23, 2017
readme.md doc: not not not necessary Sep 23, 2017
test.js fuckton (#6) Sep 3, 2017
words.json fuckton (#6) Sep 3, 2017

readme.md

an-array-of-english-words

An array of ~275,000 English words derived from the Letterpress word list. Works with node and browserify.

Programmatic Usage

To use the module in Javascript code, install it locally:

npm install an-array-of-english-words --save

Then:

const words = require('an-array-of-english-words')
const funWords = words.filter(word => word.match(/^fun/i))
console.log(funWords)

Command Line Usage

There's a CLI that prints all words to STDOUT. Install it globally:

npm i -g an-array-of-english-words

Run words to print all the words to stdout:

words

Use grep to filter by pattern:

words | grep cheese

Use egrep to filter with regular expressions:

words | egrep '^fun'            # start with 'fun'
words | egrep 'ification$'      # end with 'ification'
words | egrep 'ou?r$'           # end in 'or' or 'our'

Use wc to find out how many monkey words there are:

words | grep monkey | wc -l

Ten random ten-letter words:

$ words | egrep '^.{10}$' | gshuf | head -10

Note: On macOS, brew install coreutils to get gshuf and other goodies.

See Also

You can’t perform that action at this time.