We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daf3ac9 commit 622f73fCopy full SHA for 622f73f
stream.js
@@ -10,7 +10,7 @@ export class PackrStream extends Transform {
10
options.writableObjectMode = true
11
super(options)
12
options.sequential = true
13
- this.packr = new Packr(options)
+ this.packr = options.packr || new Packr(options)
14
}
15
_transform(value, encoding, callback) {
16
this.push(this.packr.pack(value))
@@ -25,7 +25,7 @@ export class UnpackrStream extends Transform {
25
options.objectMode = true
26
27
options.structures = []
28
- this.unpackr = new Unpackr(options)
+ this.unpackr = options.unpackr || new Unpackr(options)
29
30
_transform(chunk, encoding, callback) {
31
if (this.incompleteBuffer) {
0 commit comments