New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

which-stream

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

which-stream - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

compile/index.js

6

CHANGELOG.md

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

## 3 August 2019
### [1.2.0](https://github.com/artdecocode/which-stream/compare/v1.1.0...v1.2.0)
- [package] Compile with [_Depack_](https://compiler.page).
## 19 April 2019

@@ -2,0 +8,0 @@

40

package.json
{
"name": "which-stream",
"version": "1.1.0",
"version": "1.2.0",
"description": "A small Node.JS library to determine which stream to use.",
"main": "build/index.js",
"main": "compile/index.js",
"module": "src/index.js",

@@ -10,26 +10,16 @@ "scripts": {

"test": "yarn t test/spec",
"test-build": "ALAMODE_ENV=test-build yarn test",
"test-all": "yarn-s test test-build",
"test-watch": "yarn test -w",
"test-compile": "ALAMODE_ENV=test-compile yarn test",
"compile": "depack-dev src/depack -o compile/which-stream.js -a -c -p -s -O 2018 --source_map_include_content",
"lint": "eslint .",
"doc": "NODE_DEBUG=doc doc documentary -o README.md",
"doc": "NODE_DEBUG=doc doc -o README.md",
"rec": "NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f",
"e": "node example",
"d1": "typal src -c",
"externs": "typal externs.js -e",
"d": "yarn-s d1 externs",
"example/source-destination.js": "yarn e example/source-destination.js",
"example/source-writable.js": "yarn e example/source-writable.js",
"example/source-stdout.js": "yarn e example/source-stdout.js",
"example/readable-destination.js": "yarn e example/readable-destination.js",
"example/readable-destination-overwrite.js": "yarn e example/readable-destination-overwrite.js",
"example/readable-writable.js": "yarn e example/readable-writable.js",
"example/readable-stdout.js": "yarn e example/readable-stdout.js",
"build": "yarn-s b doc",
"b": "alamode src -o build -s"
"d1": "typal compile/index.js -c",
"externs": "typal types/externs.js -e",
"d": "yarn-s d1 externs"
},
"files": [
"build",
"compile",
"src",
"externs.js"
"types/externs.js"
],

@@ -67,12 +57,12 @@ "externs": "externs.js",

"devDependencies": {
"@wrote/ensure-path": "^1.0.8",
"alamode": "^1.9.3",
"documentary": "^1.24.1",
"@wrote/ensure-path": "^1.1.0",
"alamode": "^2.3.6",
"documentary": "^1.29.0",
"eslint-config-artdeco": "1.0.1",
"yarn-s": "1.1.0",
"zoroaster": "^3.11.6"
"zoroaster": "^4.1.1-alpha"
},
"dependencies": {
"srcDependencies": {
"catchment": "^3.3.0"
}
}

@@ -11,3 +11,5 @@ # which-stream

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/0.svg?sanitize=true"></a></p>
<p align="center"><a href="#table-of-contents">
<img src="/.documentary/section-breaks/0.svg?sanitize=true">
</a></p>

@@ -30,3 +32,5 @@ ## Table Of Contents

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/1.svg?sanitize=true"></a></p>
<p align="center"><a href="#table-of-contents">
<img src="/.documentary/section-breaks/1.svg?sanitize=true">
</a></p>

@@ -43,3 +47,5 @@ ## API

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/2.svg?sanitize=true"></a></p>
<p align="center"><a href="#table-of-contents">
<img src="/.documentary/section-breaks/2.svg?sanitize=true">
</a></p>

@@ -50,17 +56,16 @@ ## `async whichStream(`<br/>&nbsp;&nbsp;`config: Config,`<br/>`): void`

`import('stream').Readable` __<a name="type-streamreadable">`stream.Readable`</a>__
<strong><a name="type-_whichstreamconfig">`_whichStream.Config`</a></strong>: The configuration object.
`import('stream').Writable` __<a name="type-streamwritable">`stream.Writable`</a>__
__<a name="type-_whichstreamconfig">`_whichStream.Config`</a>__: The configuration object.
| Name | Type | Description |
| ----------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| source | <em>string</em> | The path to a source file from which to read data. |
| readable | <em>[!stream.Readable](https://nodejs.org/api/stream.html#stream_class_stream_readable)</em> | An optional input stream, if the `source` is not given. |
| destination | <em>string</em> | The path to an output file. If `-` is given, `process.stdout` will be used. If the path of the input stream is the same as of the output one, the result will be first written to the memory, and only then to the destination file. Moreover, when used with the `readable` specified to overwrite the file from which data is originally read from, the `source` should also be passed. |
| writable | <em>[!stream.Writable](https://nodejs.org/api/stream.html#stream_class_stream_writable)</em> | A stream into which to pipe the input stream, if `destination` is not given. |
| Name | Type | Description |
| ----------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| source | _string_ | The path to a source file from which to read data. |
| readable | _[!stream.Readable](#type-streamreadable)_ | An optional input stream, if the `source` is not given. |
| destination | _string_ | The path to an output file. If `-` is given, `process.stdout` will be used. If the path of the input stream is the same as of the output one, the result will be first written to the memory, and only then to the destination file. Moreover, when used with the `readable` specified to overwrite the file from which data is originally read from, the `source` should also be passed. |
| writable | _[!stream.Writable](#type-streamwritable)_ | A stream into which to pipe the input stream, if `destination` is not given. |
<p align="center"><a href="#table-of-contents">
<img src="/.documentary/section-breaks/3.svg?sanitize=true">
</a></p>
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/3.svg?sanitize=true"></a></p>
## Use Cases

@@ -225,3 +230,3 @@

plastic zip bag, and stow in freezer.
Modified: Fri Apr 19 2019
Modified: Sat Aug 03 2019
```

@@ -306,3 +311,5 @@

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/-1.svg?sanitize=true"></a></p>
<p align="center"><a href="#table-of-contents">
<img src="/.documentary/section-breaks/-1.svg?sanitize=true">
</a></p>

@@ -315,3 +322,4 @@ ## Copyright

<a href="https://artd.eco">
<img src="https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png" alt="Art Deco" />
<img width="100" src="https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png"
alt="Art Deco">
</a>

@@ -322,4 +330,4 @@ </th>

<a href="https://www.technation.sucks" title="Tech Nation Visa">
<img src="https://raw.githubusercontent.com/artdecoweb/www.technation.sucks/master/anim.gif"
alt="Tech Nation Visa" />
<img width="100" src="https://raw.githubusercontent.com/idiocc/cookies/master/wiki/arch4.jpg"
alt="Tech Nation Visa">
</a>

@@ -326,0 +334,0 @@ </th>

import Catchment from 'catchment'
import {
createWriteStream,
createReadStream,
} from 'fs'
import { createWriteStream, createReadStream } from 'fs'
import { Writable } from 'stream'

@@ -11,6 +8,2 @@

* @param {!_whichStream.Config} config The configuration object.
* @param {string} [config.source] The path to a source file from which to read data.
* @param {!stream.Readable} [config.readable] An optional input stream, if the `source` is not given.
* @param {string} [config.destination] The path to an output file. If `-` is given, `process.stdout` will be used. If the path of the input stream is the same as of the output one, the result will be first written to the memory, and only then to the destination file. Moreover, when used with the `readable` specified to overwrite the file from which data is originally read from, the `source` should also be passed.
* @param {!stream.Writable} [config.writable] A stream into which to pipe the input stream, if `destination` is not given.
*/

@@ -68,22 +61,5 @@ async function whichStream(config) {

/* documentary types/index.xml */
/**
* @suppress {nonStandardJsDocs}
* @typedef {_whichStream.Config} Config The configuration object.
* @typedef {import('..').Config} _whichStream.Config
*/
/**
* @suppress {nonStandardJsDocs}
* @typedef {Object} _whichStream.Config The configuration object.
* @prop {string} [source] The path to a source file from which to read data.
* @prop {!stream.Readable} [readable] An optional input stream, if the `source` is not given.
* @prop {string} [destination] The path to an output file. If `-` is given, `process.stdout` will be used. If the path of the input stream is the same as of the output one, the result will be first written to the memory, and only then to the destination file. Moreover, when used with the `readable` specified to overwrite the file from which data is originally read from, the `source` should also be passed.
* @prop {!stream.Writable} [writable] A stream into which to pipe the input stream, if `destination` is not given.
*/
/**
* @suppress {nonStandardJsDocs}
* @typedef {import('stream').Readable} stream.Readable
*/
/**
* @suppress {nonStandardJsDocs}
* @typedef {import('stream').Writable} stream.Writable
*/
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc