8000 GitHub - sindresorhus/word-stream: Returns a stream of English words
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sindresorhus/word-stream

Repository files navigation

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

About

Returns a stream of English words

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
0