feat: init
This commit is contained in:
19
node_modules/unenv/dist/runtime/node/internal/stream/duplex.mjs
generated
vendored
Normal file
19
node_modules/unenv/dist/runtime/node/internal/stream/duplex.mjs
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { mergeFns } from "../../../_internal/utils.mjs";
|
||||
import { Readable } from "./readable.mjs";
|
||||
import { Writable } from "./writable.mjs";
|
||||
const __Duplex = class {
|
||||
allowHalfOpen = true;
|
||||
_destroy;
|
||||
constructor(readable = new Readable(), writable = new Writable()) {
|
||||
Object.assign(this, readable);
|
||||
Object.assign(this, writable);
|
||||
this._destroy = mergeFns(readable._destroy, writable._destroy);
|
||||
}
|
||||
};
|
||||
function getDuplex() {
|
||||
Object.assign(__Duplex.prototype, Readable.prototype);
|
||||
Object.assign(__Duplex.prototype, Writable.prototype);
|
||||
return __Duplex;
|
||||
}
|
||||
export const _Duplex = /* @__PURE__ */ getDuplex();
|
||||
export const Duplex = globalThis.Duplex || _Duplex;
|
||||
Reference in New Issue
Block a user