実行時にnode.js-streamから継承するクラスからこの種のデータを省略しようとしていますconsole.log()
:
asset:
PassThrough {
filename: 'old_man',
data: <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 f0 00 f0 00 00 ff db 00 43 00 05 03 04 04 04 03 05 04 04 04 05 05 05 06 07 0c 08 07 07 07 07 0f 0b 0b 09 ... >,
originalLocation: '/path/to/lib/image.jpg',
contentType: [Getter/Setter],
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: null,
ended: false,
endEmitted: false,
reading: false,
...など
通常、私は次のようなことを試します:
Object.defineProperty(self, 'PassThrough', {
configurable: true,
writable: true,
enumerable: false
})
しかし、PassThrough
実際にはオブジェクトのプロパティではないため、機能しません。からストリーム情報を非表示にするにはどうすればよいconsole.log()
ですか?
(免責事項: 設計によるものであり、非表示にするのはおそらく悪い考えであることは認識しています;)