All Questions
3 questions
2
votes
0
answers
297
views
JavaScript proxy for better stack traces from external libraries
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 ...
3
votes
1
answer
7k
views
Retry a Promise resolution N times, with a delay between the attempts
I want some JavaScript code to take 3 things as parameters:
A function returning a Promise.
The maximum number of attempts.
The delay between each attempt.
What I ended up doing is using a ...
4
votes
1
answer
1k
views
Loading a database table using a promise chain
I am creating a util module that I'm using to communicate with a MS-SQL database. I want each public method to return a promise. I started with a private function that executes a DB query and returns ...