Skip to content

feat(native): add to-readable-stream to replacements - #1257

Merged
43081j merged 1 commit into
e18e:mainfrom
maksimgm:feat/to-readable-stream
Nov 20, 2026
Merged

43081j merged 1 commit into
e18e:mainfrom
maksimgm:feat/to-readable-stream

Conversation

@maksimgm

Copy link
Copy Markdown
Contributor

🔗 Linked issue

closes #1192

📚 Description

maps to-readable-stream (~5.4M weekly downloads) to the existing native Readable.from, same as from2-string.

import toReadableStream from 'to-readable-stream' // [!code --]
import { Readable } from 'node:stream' // [!code ++]

const stream = toReadableStream('hello') // [!code --]
const stream = Readable.from(['hello']) // [!code ++]

most downloads are v1 (~85%), which returns a node Readable. checked v1 against Readable.from([value]) and v4 against ReadableStream.from([value]) with strings, buffers and unicode, same output

@43081j
43081j merged commit e5095f7 into e18e:main Nov 20, 2026
5 checks passed
@maksimgm
maksimgm deleted the feat/to-readable-stream branch November 25, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Replacement]: to-readable-stream

2 participants