Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

to-readable-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

to-readable-stream - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

32

index.d.ts
/// <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"
}
}
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