Home

Awesome

word-stream

Returns a stream of English words from the Letterpress Word List

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

Install

npm install word-stream

Usage

import wordStream from 'word-stream';

wordStream().on('data', word => {
	console.log(word);
});
//=> …
//=> abmhos
//=> abnegate
//=> …

Tip

You can get all the words at once by using get-stream:

import wordStream from 'word-stream';
import {getStreamAsArray} from 'get-stream';

console.log(await getStreamAsArray(wordStream()));
//=> […, 'abmhos', 'abnegate', …]