word-stream

2.0.0 • Public • Published

word-stream Build Status

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 --save word-stream

Usage

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

Tip

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

const getStream = require('get-stream');
const wordStream = require('word-stream');
 
getStream.array(wordStream).then(words =>
    console.log(words);
    //=> […, 'abmhos', 'abnegate', …]
});

License

MIT © Sindre Sorhus

Package Sidebar

Install

npm i word-stream

Weekly Downloads

9

Version

2.0.0

License

MIT

Last publish

Collaborators

  • sindresorhus