mirror of
https://github.com/davidmarkclements/0x.git
synced 2026-01-25 14:47:55 +00:00
No matter how you write to stdout, this should catch it! The `defineProperty` call uses the same options as the default `process.stdout`.
14 lines
229 B
JavaScript
14 lines
229 B
JavaScript
'use strict'
|
|
const net = require('net')
|
|
|
|
const socket = new net.Socket({
|
|
fd: 3,
|
|
readable: false,
|
|
writable: true
|
|
})
|
|
Object.defineProperty(process, 'stdout', {
|
|
configurable: true,
|
|
enumerable: true,
|
|
get: () => socket
|
|
})
|