Skip to content

Commit

Permalink
Experiment with importing webstreams
Browse files Browse the repository at this point in the history
  • Loading branch information
scorbajio committed Jan 12, 2024
1 parent 417b466 commit a7b917d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/trie/src/util/readStream.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ReadableStream } from 'node:stream/web'
import { Readable } from 'readable-stream'

import { BranchNode, LeafNode } from '../node/index.js'
Expand All @@ -14,6 +15,8 @@ export class TrieReadStream extends Readable {
constructor(trie: Trie) {
super({ objectMode: true })

const s = new ReadableStream()
void s.cancel()
this.trie = trie
this._started = false
}
Expand Down

0 comments on commit a7b917d

Please sign in to comment.