Skip to main content

Questions tagged [promise]

"Promises" are a particular tactic for deferred computing, suitable for several styles of concurrency: thread and event loop concurrency for local computation, and both synchronous and asynchronous remote messaging.

6 votes
2 answers
311 views

I use the following snippet with my browser homepage to detect whether or not I have my VPN connection turned on. If the IP timezone is different from the browser timezone, then it is most likely the ...
jsx97's user avatar
  • 207
4 votes
1 answer
109 views

I am interested in creating a class that manages a thread and executes SQL queries sequentially within it. The queries would be submitted from various parts of the program, and the results would be ...
QuitLN's user avatar
  • 43
1 vote
1 answer
111 views

I have created Axios wrapper following SOLID principles. Is there any feedback on improving it's structure in a more cleaner and better way? axiosconfig.ts ...
C Sharp Guy's user avatar
4 votes
2 answers
439 views

I have attempted to implement the native Promise object provided by the browser in JavaScript. The code is pretty easy to understand. It supports most of the promise functionalities, such as chaining, ...
Toban Harnish's user avatar
14 votes
2 answers
47k views

I am experimenting with the best way to standardise my dynamic import() expressions when importing javascript modules. import() ...
Rounin's user avatar
  • 409
0 votes
1 answer
118 views

I was suggested by @Bergi on StackOverflow that Async Promise constructors are any pattern. The argument behind this is that async Promise swallows the errors. In my case, I have try..catch so I'm not ...
jcubic's user avatar
  • 248
4 votes
2 answers
165 views

I wrote an idempotent script loader (for the browser), where the same script won't be loaded more than once. scriptLoader.js: ...
lonix's user avatar
  • 153
8 votes
3 answers
4k views

for clarity: moved here from stackoverflow after being pointed to Code Review being the better place for this question I love async/await and Promises since I got my hands on them. And I might be ...
gaugau's user avatar
  • 191
10 votes
2 answers
24k views

I wrote a small function that checks if an image or multiple images are loaded. For that purpose, I decided to use ES6 promises, but I'm not really sure if my way of handling errors is the best way. <...
mrksbnch's user avatar
  • 277
10 votes
2 answers
571 views

A couple of days ago a user in chat asked us to spend more time in the queues. Kick starting my desire to get notifications for new items in the queues. Reviewing the queues has been something I've ...
Peilonrayz's user avatar
  • 44.7k
1 vote
1 answer
453 views

I have built a basic app which uses firebase for authentication. The app is pretty simple. Sign up the user to firebase using email and password. Sign in the user Sign out the user Also, I have ...
DeveloperLV's user avatar
4 votes
1 answer
1k views

Imagine we have a function that returns a Promise, ie call a GET endpoint of an api and return the response data. ...
slepic's user avatar
  • 5,657
2 votes
0 answers
316 views

I've been using the excellent pg-promise library for a few years now, but my primary irk with it is that the stack traces are sometimes unhelpful. For example, the following test will fail (currently ...
BrDaHa's user avatar
  • 133
1 vote
1 answer
2k views

I am trying to re-organise my mp3 collection based on its id3 meta data into folders based on the artist. I'm new to nodeJs and more importantly promises. I was hoping I could get some feedback on my ...
James's user avatar
  • 197
2 votes
1 answer
138 views

I am building a basic authentication system with a node backend and wonder whether I am using the try-catch block excessively. I have this example controller: ...
user8758206's user avatar

15 30 50 per page
1
2 3 4 5
17