// reply with stream helper const replyWithStream = dataArr => { const replyStream = _(); dataArr.forEach(data => replyStream.write(JSON.stringify(data))); replyStream.end(''); return [200, new Readable().wrap(replyStream)]; }
let result = {}; const stream = _(tarStream.pipe(got.stream.post(remoteUrl, options))) .split() .filter(l => l && l.length);
_(readFile(filePath)).map(res => ({filename, text: res.toString()}))
_(sections) .map(section => section.replace(/\r/g, '')) .filter(section => section && section.length > 0 && section.replace(/\n/g, '').length > 0) if (!linksText) { console.error('Error processing file:', filename, 'section:', text); return _([]); return _(links) .filter(l => l && l.length > 0) .map(link => {