A stream is an abstract interface for working with streaming data in Node.js. The stream module provides a base API that makes it easy to build objects that implement the stream interface.
Questions tagged [nodejs-stream]
306 questions
0
votes
2 answers
Regex to add a word before an existing word in node
Appreciate any help to write a nodejs regex.
First search for the exact words "ChildBucketOne" and "ChildBucketTwo" and add exact word ParentBucket before every occurence of ChildBucketOne or/and ChildBucketTwo.
I am trying to use one regex.
Input1:…

Eva
- 109
- 9
0
votes
1 answer
Read files from inout dir, apply the regex, write all files to output dir all at once
I have two folders, input and output folder with many text files in the below format. How do I read all the files from the input folder,run the regex and write all the updated files to another output folder?I am using nodejs.
Input:…

Eva
- 109
- 9
0
votes
2 answers
How to get value in async function?
I tried two function in(async function,normal function)in node js.normal function its sucessfully return value.but async function its cant return value.How to fix it
normal function
index.js
var sample_data = require('./product')
const data =…

smith hari
- 437
- 1
- 11
- 22
0
votes
1 answer
difference between call back function and normal function using node js
I implement callback function in node js. but I have doubt in callback function.I tried two function in node js one callback function and another normal function.both function i tried to run its given same result.I do no any one explain my code. …

smith hari
- 437
- 1
- 11
- 22
0
votes
3 answers
How to get to be return and print in outside function using node js
I tried one simple function in node js and pass data to one file on to another file.but its throwing undefined.how to solve it in node js
fun.js
function Get_Value()
{
client.get('products', function(err,results) {
return results
…

smith hari
- 437
- 1
- 11
- 22
0
votes
1 answer
how to jwt token verify using nodejs
how to implement jwt verify token implement in node js.I already tried but its not showing error but its showing undefined.How to solve this issue.
auth.py
function jwtAccessAuthCheck(accessToken)
{
if(accessToken)
{
…

smith hari
- 437
- 1
- 11
- 22
0
votes
1 answer
Node.js & Gulp: Real piping sequence could differ from written '.pipe()'s chain?
In the below code, fileShouldBePreprocessedBySass() will be called before console.log('intercepted!'); execution. Also, in fileShouldBePreprocessedBySass(targetFileAbsolutePath), parameter targetFileAbsolutePath will be undefined:
let…

Takeshi Tokugawa YD
- 670
- 5
- 40
- 124
0
votes
1 answer
Node zlib incremental inflate
I've located the end of a local file header in download stream of a large zip file that
specifies deflate compression with
bit 3 set indicating the length of the compressed data follows the compressed data
and would like to now inflate that…

Christopher King
- 1,034
- 1
- 8
- 21
0
votes
0 answers
Read the first X lines of sorted data from a stream?
Relatively new with Node. Trying to work with streams.
I am looking to read from and sort a large file containing numbers (newline separated). I have sorted my file as per the the method here (method #5, referenced in this thread actually), and…

Mugshep
- 788
- 1
- 9
- 18
0
votes
1 answer
How to perform real-time speech recognition | Google Cloud Speech-to-Text
I'm trying to transcribe audio from my speakers
I'm piping sound from speakers to node.js file (https://askubuntu.com/a/850174)
parec -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor --rate=16000 --channels=1 | node transcribe.js
This is my…

Serhii Shliakhov
- 2,631
- 3
- 19
- 37
0
votes
2 answers
How to serve image raw binary data in nodejs
I have an img tag in my html that requests the image from nodejs server. In my server js file I have below code to send image response but I observed data is not rendered on client side. Any suggestions?
const getFile = (filePath) => {
return…

Krishna Santosh Nidri
- 380
- 2
- 10
0
votes
1 answer
Node js :- Response chunks to file re-named with content-disposition
I am trying to get a document (pdf/docx/zip/..) from an API and save it with the file name received at content-disposition in response header. I have tried the below methods. But either the file is not saved with the actual file name or the file is…

N29
- 141
- 1
- 17
0
votes
1 answer
Isn't the http module of nodejs capable of receiving / sending the whole request / response at once?
I am learning to http module of nodejs. I found a section in the documentation that says:
The interface is careful to never buffer entire requests or responses
Does it means that this module is not capable of receiving / sending the whole request…

Stack Overflow
- 1
- 5
- 23
- 51
0
votes
1 answer
How can I listen to an event inside a custom Readable stream in NodeJS?
This is my code :
class Counter extends Readable {
constructor() {
super();
}
_read () {
readStream.on('data', (data) => {
console.log(JSON.stringify(data));
this.push(JSON.stringify(data));
…

Arka
- 65
- 9
0
votes
0 answers
MongoDB GridFS, downloading image always returning only last image from a set of images
I am trying to retreive a set of images stored in mongoDB using mongoose and GridFS. I'm storing the filenames in an array and looping to retreive each one and store it in a local path. However, only the last image is downloaded and stored, the loop…

Mithil Mohan
- 223
- 2
- 11