Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
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 - npm Package Compare versions

Comparing version
2.0.0
to
3.0.0
+6
-5
index.js

@@ -1,6 +0,7 @@

'use strict';
const fs = require('fs');
const binarySlit = require('binary-split');
const wordListPath = require('word-list');
import fs from 'node:fs';
import binarySlit from 'binary-split';
import wordListPath from 'word-list';
module.exports = fs.createReadStream(wordListPath).pipe(binarySlit());
export default function wordStream() {
return fs.createReadStream(wordListPath).pipe(binarySlit());
}
{
"name": "word-stream",
"version": "2.0.0",
"description": "Returns a stream of English words",
"license": "MIT",
"repository": "sindresorhus/word-stream",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"word",
"words",
"stream",
"list",
"en",
"english",
"dict",
"dictionary"
],
"dependencies": {
"binary-split": "^1.0.3",
"word-list": "^2.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
"name": "word-stream",
"version": "3.0.0",
"description": "Returns a stream of English words",
"license": "MIT",
"repository": "sindresorhus/word-stream",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"sideEffects": false,
"engines": {
"node": ">=18"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"word",
"words",
"stream",
"list",
"en",
"english",
"dict",
"dictionary"
],
"dependencies": {
"binary-split": "^1.0.5",
"word-list": "^4.0.0"
},
"devDependencies": {
"ava": "^6.1.2",
"p-event": "^6.0.1",
"xo": "^0.58.0"
}
}

@@ -1,2 +0,2 @@

# word-stream [![Build Status](https://travis-ci.org/sindresorhus/word-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/word-stream)
# word-stream

@@ -7,16 +7,14 @@ > Returns a stream of English words from the [Letterpress Word List](https://github.com/atebits/Words/blob/master/Words/en.txt)

## Install
```sh
npm install word-stream
```
$ npm install --save word-stream
```
## Usage
```js
const wordStream = require('word-stream');
import wordStream from 'word-stream';
wordStream.on('data', word => {
wordStream().on('data', word => {
console.log(word);

@@ -30,3 +28,2 @@ });

## Tip

@@ -37,14 +34,7 @@

```js
const getStream = require('get-stream');
const wordStream = require('word-stream');
import wordStream from 'word-stream';
import {getStreamAsArray} from 'get-stream';
getStream.array(wordStream).then(words =>
console.log(words);
//=> […, 'abmhos', 'abnegate', …]
});
console.log(await getStreamAsArray(wordStream()));
//=> […, 'abmhos', 'abnegate', …]
```
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

Sorry, the diff of this file is not supported yet