New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

word-stream

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

word-stream

Returns a stream of English words

Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
5
66.67%
Maintainers
1
Weekly downloads
 
Created
Source

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

Example

var wordStream = require('word-stream');

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

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

var toArray = require('stream-to-array');
var wordStream = require('word-stream');

toArray(wordStream, function (wordArray) {
	console.log(wordArray);
	//=> [..., 'abmhos', 'abnegate', ...]
});

CLI

You can also use it as a CLI app by installing it globally:

npm install --global word-stream

Usage

❯ word-stream -h

word-stream
or
word-stream > <output file>

License

MIT © Sindre Sorhus

Keywords

word

FAQs

Package last updated on 04 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts