Please consider below code. What I want to do is to pick name from names.txt in createStream function one by one and from there call FileSearch function with nameToSearch as parameter and search list.txt line by line. So one name and search list.txt...
I'm simply trying to wait for a user to enter a password and then use it before moving on the rest of my code. The error is Cannot read property 'then' of undefined.  let rl = readline.createInterface({     input: process.stdin,     outpu...
I'm trying to parse over a file, and replace lines that say "foobar" with lines that say "bazbar". It just returns an empty file. I have no idea what I'm doing wrong and docs aren't being particularly helpful.  var readlin...
I am creating a program to take input of two numbers from the command line and then showing there sum in node.js. I am using readline module to take stdin. Below is my code.  const readline = require('readline');  const rl = readline.createIn...
I am learning node.js and need to use readline for a project. I have the following code directly from the readline module example.   const readline = require('readline');  const rl = readline.createInterface({   input: process.stdin,   output...
Is there a way to read a line from the Mongo shell? readline() is not defined and neither is system.stdin.  I need to do this in interactive mode, as opposed to feeding input to a script executed by the MongoDB shell....
I'd like to teach students how to program using JavaScript. I don't want to introduce new students to call-backs or any other complex program structure. Looking at Node.js the readline used for standard input uses a call-back. For simple inpu...
I'm trying to use readline inside an else if statement:  var rl = readline.createInterface({ input: process.stdin, output: process.stdout });  rl.question("Would you like to see which cars are available? Please type yes/no: ", function(an...
I have a "simple" problem that I cant seem to get around. Im just going to read input from standard input (terminal) and then save the input to a variable (here an array) and then print it all out to the terminal. When I try to paste in more...
What I'd like to do is hiding/erasing all users input from a nodejs console app once entered, so that when the user inserts some text and then types enter, he won't be able to read what he just entered in the console anymore (so basically rem...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.