word-stream

3.0.0 • Public • Published

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', …]

Package Sidebar

Install

npm i word-stream

Weekly Downloads

5

Version

3.0.0

License

MIT

Unpacked Size

2.83 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus