údržba
This commit is contained in:
		
							
								
								
									
										79
									
								
								CyLukTs/lukan/node_modules/is-stream/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								CyLukTs/lukan/node_modules/is-stream/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,79 @@
 | 
			
		||||
import * as stream from 'stream';
 | 
			
		||||
 | 
			
		||||
declare const isStream: {
 | 
			
		||||
	/**
 | 
			
		||||
	@returns Whether `stream` is a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).
 | 
			
		||||
 | 
			
		||||
	@example
 | 
			
		||||
	```
 | 
			
		||||
	import * as fs from 'fs';
 | 
			
		||||
	import isStream = require('is-stream');
 | 
			
		||||
 | 
			
		||||
	isStream(fs.createReadStream('unicorn.png'));
 | 
			
		||||
	//=> true
 | 
			
		||||
 | 
			
		||||
	isStream({});
 | 
			
		||||
	//=> false
 | 
			
		||||
	```
 | 
			
		||||
	*/
 | 
			
		||||
	(stream: unknown): stream is stream.Stream;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	@returns Whether `stream` is a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).
 | 
			
		||||
 | 
			
		||||
	@example
 | 
			
		||||
	```
 | 
			
		||||
	import * as fs from 'fs';
 | 
			
		||||
	import isStream = require('is-stream');
 | 
			
		||||
 | 
			
		||||
	isStream.writable(fs.createWriteStrem('unicorn.txt'));
 | 
			
		||||
	//=> true
 | 
			
		||||
	```
 | 
			
		||||
	*/
 | 
			
		||||
	writable(stream: unknown): stream is stream.Writable;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	@returns Whether `stream` is a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
 | 
			
		||||
 | 
			
		||||
	@example
 | 
			
		||||
	```
 | 
			
		||||
	import * as fs from 'fs';
 | 
			
		||||
	import isStream = require('is-stream');
 | 
			
		||||
 | 
			
		||||
	isStream.readable(fs.createReadStream('unicorn.png'));
 | 
			
		||||
	//=> true
 | 
			
		||||
	```
 | 
			
		||||
	*/
 | 
			
		||||
	readable(stream: unknown): stream is stream.Readable;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	@returns Whether `stream` is a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
 | 
			
		||||
 | 
			
		||||
	@example
 | 
			
		||||
	```
 | 
			
		||||
	import {Duplex} from 'stream';
 | 
			
		||||
	import isStream = require('is-stream');
 | 
			
		||||
 | 
			
		||||
	isStream.duplex(new Duplex());
 | 
			
		||||
	//=> true
 | 
			
		||||
	```
 | 
			
		||||
	*/
 | 
			
		||||
	duplex(stream: unknown): stream is stream.Duplex;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	@returns Whether `stream` is a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).
 | 
			
		||||
 | 
			
		||||
	@example
 | 
			
		||||
	```
 | 
			
		||||
	import * as fs from 'fs';
 | 
			
		||||
	import Stringify = require('streaming-json-stringify');
 | 
			
		||||
	import isStream = require('is-stream');
 | 
			
		||||
 | 
			
		||||
	isStream.transform(Stringify());
 | 
			
		||||
	//=> true
 | 
			
		||||
	```
 | 
			
		||||
	*/
 | 
			
		||||
	transform(input: unknown): input is stream.Transform;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export = isStream;
 | 
			
		||||
							
								
								
									
										28
									
								
								CyLukTs/lukan/node_modules/is-stream/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								CyLukTs/lukan/node_modules/is-stream/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
const isStream = stream =>
 | 
			
		||||
	stream !== null &&
 | 
			
		||||
	typeof stream === 'object' &&
 | 
			
		||||
	typeof stream.pipe === 'function';
 | 
			
		||||
 | 
			
		||||
isStream.writable = stream =>
 | 
			
		||||
	isStream(stream) &&
 | 
			
		||||
	stream.writable !== false &&
 | 
			
		||||
	typeof stream._write === 'function' &&
 | 
			
		||||
	typeof stream._writableState === 'object';
 | 
			
		||||
 | 
			
		||||
isStream.readable = stream =>
 | 
			
		||||
	isStream(stream) &&
 | 
			
		||||
	stream.readable !== false &&
 | 
			
		||||
	typeof stream._read === 'function' &&
 | 
			
		||||
	typeof stream._readableState === 'object';
 | 
			
		||||
 | 
			
		||||
isStream.duplex = stream =>
 | 
			
		||||
	isStream.writable(stream) &&
 | 
			
		||||
	isStream.readable(stream);
 | 
			
		||||
 | 
			
		||||
isStream.transform = stream =>
 | 
			
		||||
	isStream.duplex(stream) &&
 | 
			
		||||
	typeof stream._transform === 'function';
 | 
			
		||||
 | 
			
		||||
module.exports = isStream;
 | 
			
		||||
							
								
								
									
										9
									
								
								CyLukTs/lukan/node_modules/is-stream/license
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								CyLukTs/lukan/node_modules/is-stream/license
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
MIT License
 | 
			
		||||
 | 
			
		||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 | 
			
		||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
							
								
								
									
										42
									
								
								CyLukTs/lukan/node_modules/is-stream/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								CyLukTs/lukan/node_modules/is-stream/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
{
 | 
			
		||||
	"name": "is-stream",
 | 
			
		||||
	"version": "2.0.1",
 | 
			
		||||
	"description": "Check if something is a Node.js stream",
 | 
			
		||||
	"license": "MIT",
 | 
			
		||||
	"repository": "sindresorhus/is-stream",
 | 
			
		||||
	"funding": "https://github.com/sponsors/sindresorhus",
 | 
			
		||||
	"author": {
 | 
			
		||||
		"name": "Sindre Sorhus",
 | 
			
		||||
		"email": "sindresorhus@gmail.com",
 | 
			
		||||
		"url": "https://sindresorhus.com"
 | 
			
		||||
	},
 | 
			
		||||
	"engines": {
 | 
			
		||||
		"node": ">=8"
 | 
			
		||||
	},
 | 
			
		||||
	"scripts": {
 | 
			
		||||
		"test": "xo && ava && tsd"
 | 
			
		||||
	},
 | 
			
		||||
	"files": [
 | 
			
		||||
		"index.js",
 | 
			
		||||
		"index.d.ts"
 | 
			
		||||
	],
 | 
			
		||||
	"keywords": [
 | 
			
		||||
		"stream",
 | 
			
		||||
		"type",
 | 
			
		||||
		"streams",
 | 
			
		||||
		"writable",
 | 
			
		||||
		"readable",
 | 
			
		||||
		"duplex",
 | 
			
		||||
		"transform",
 | 
			
		||||
		"check",
 | 
			
		||||
		"detect",
 | 
			
		||||
		"is"
 | 
			
		||||
	],
 | 
			
		||||
	"devDependencies": {
 | 
			
		||||
		"@types/node": "^11.13.6",
 | 
			
		||||
		"ava": "^1.4.1",
 | 
			
		||||
		"tempy": "^0.3.0",
 | 
			
		||||
		"tsd": "^0.7.2",
 | 
			
		||||
		"xo": "^0.24.0"
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										60
									
								
								CyLukTs/lukan/node_modules/is-stream/readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								CyLukTs/lukan/node_modules/is-stream/readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,60 @@
 | 
			
		||||
# is-stream
 | 
			
		||||
 | 
			
		||||
> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html)
 | 
			
		||||
 | 
			
		||||
## Install
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ npm install is-stream
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
const fs = require('fs');
 | 
			
		||||
const isStream = require('is-stream');
 | 
			
		||||
 | 
			
		||||
isStream(fs.createReadStream('unicorn.png'));
 | 
			
		||||
//=> true
 | 
			
		||||
 | 
			
		||||
isStream({});
 | 
			
		||||
//=> false
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## API
 | 
			
		||||
 | 
			
		||||
### isStream(stream)
 | 
			
		||||
 | 
			
		||||
Returns a `boolean` for whether it's a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).
 | 
			
		||||
 | 
			
		||||
#### isStream.writable(stream)
 | 
			
		||||
 | 
			
		||||
Returns a `boolean` for whether it's a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).
 | 
			
		||||
 | 
			
		||||
#### isStream.readable(stream)
 | 
			
		||||
 | 
			
		||||
Returns a `boolean` for whether it's a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
 | 
			
		||||
 | 
			
		||||
#### isStream.duplex(stream)
 | 
			
		||||
 | 
			
		||||
Returns a `boolean` for whether it's a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
 | 
			
		||||
 | 
			
		||||
#### isStream.transform(stream)
 | 
			
		||||
 | 
			
		||||
Returns a `boolean` for whether it's a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).
 | 
			
		||||
 | 
			
		||||
## Related
 | 
			
		||||
 | 
			
		||||
- [is-file-stream](https://github.com/jamestalmage/is-file-stream) - Detect if a stream is a file stream
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
<div align="center">
 | 
			
		||||
	<b>
 | 
			
		||||
		<a href="https://tidelift.com/subscription/pkg/npm-is-stream?utm_source=npm-is-stream&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
 | 
			
		||||
	</b>
 | 
			
		||||
	<br>
 | 
			
		||||
	<sub>
 | 
			
		||||
		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
 | 
			
		||||
	</sub>
 | 
			
		||||
</div>
 | 
			
		||||
		Reference in New Issue
	
	Block a user