Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

word-list

sindresorhus20.4kMIT4.1.0TypeScript support: included

List of English words

word, words, word-list, list, en, english, dict, dictionary

readme

word-list

List of English words

Useful if you're creating a word game or just want some words to work with.

Used by word-stream and random-word.

One-letter words are not included. Many common bad words are also filtered out.

Install

npm install word-list

Usage

import fs from 'node:fs';

// Returns the path to the word list which is separated by `\n`.
import wordListPath from 'word-list';

const wordArray = fs.readFileSync(wordListPath, 'utf8').split('\n');
//=> […, 'abmhos', 'abnegate', …]