to-readable-stream
Advanced tools
Comparing version 2.0.0 to 2.1.0
/// <reference types="node"/> | ||
import {Readable as ReadableStream} from 'stream'; | ||
/** | ||
* Convert a `string`/`Buffer`/`Uint8Array` to a [readable stream](https://nodejs.org/api/stream.html#stream_readable_streams). | ||
* | ||
* @param input - Value to convert to a stream. | ||
*/ | ||
export default function toReadableStream( | ||
input: string | Buffer | Uint8Array | ||
): ReadableStream; | ||
declare const toReadableStream: { | ||
/** | ||
Convert a `string`/`Buffer`/`Uint8Array` to a [readable stream](https://nodejs.org/api/stream.html#stream_readable_streams). | ||
@param input - Value to convert to a stream. | ||
@example | ||
``` | ||
import toReadableStream = require('to-readable-stream'); | ||
toReadableStream('🦄🌈').pipe(process.stdout); | ||
``` | ||
*/ | ||
(input: string | Buffer | Uint8Array): ReadableStream; | ||
// TODO: Remove this for the next major release, refactor the whole definition to: | ||
// declare function toReadableStream( | ||
// input: string | Buffer | Uint8Array | ||
// ): ReadableStream; | ||
// export = toReadableStream; | ||
default: typeof toReadableStream; | ||
}; | ||
export = toReadableStream; |
@@ -14,2 +14,3 @@ 'use strict'; | ||
module.exports = toReadableStream; | ||
// TODO: Remove this for the next major release | ||
module.exports.default = toReadableStream; |
{ | ||
"name": "to-readable-stream", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Convert a string/Buffer/Uint8Array to a readable stream", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -38,7 +38,7 @@ "files": [ | ||
"devDependencies": { | ||
"ava": "^1.3.1", | ||
"get-stream": "^4.1.0", | ||
"tsd-check": "^0.3.0", | ||
"ava": "^1.4.1", | ||
"get-stream": "^5.0.0", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3770
34