⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
qda-digital.online
/
node_modules
/
bfj
/
src
/
Edit File: unpipe.js
'use strict' const stream = require('stream') const check = require('check-types') const parse = require('./parse') module.exports = unpipe /** * Public function `unpipe`. * * Returns a writeable stream that can be passed to stream.pipe, then parses JSON * data read from the stream. If there are no errors, the callback is invoked with * the result as the second argument. If errors occur, the first error is passed to * the callback as the first argument. * * @param callback: Function that will be called after parsing is complete. * * @option reviver: Transformation function, invoked depth-first. * * @option discard: The number of characters to process before discarding them * to save memory. The default value is `1048576`. * * @option yieldRate: The number of data items to process per timeslice, * default is 16384. **/ function unpipe (callback, options) { check.assert.function(callback, 'Invalid callback argument') const jsonstream = new stream.PassThrough() parse(jsonstream, Object.assign({}, options, { ndjson: false })) .then(data => callback(null, data)) .catch(error => callback(error)) return jsonstream }
Simpan