python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How can we export resolved promise from a js file?
I have to export a result of async function from a Javascript file. Right now, When I export it, I am getting a promise which needs then() function in each file wherever we want to import that file. ...
Suraj Singh
Votes: 0
Answers: 1
Call function after another function completes
I am trying to use a promise to ensure one function, "submit()" is called after the another function, "save()" has been completed. I haven't used promises in a long while and I'm c...
Robgit28
Votes: 0
Answers: 0
Why is the code below 'return next()' still being executed?
As I understood next(), it stops the middleware function and moves on (to the next middleware). Here, however the second then()-method is executed ignoring the next().
This leads to an error in my cod...
Nothere
Votes: 0
Answers: 0
How to resolve pending promises within map returning an object?
This would resolve all promises
const promises = files.map(filename => getPdfToPrint(`output\\${outputDirectory}\\` , filename.replace("/", "")));
const res = await Promise.all(...
Invader
Votes: 0
Answers: 1