Questions tagged [node-promisify]

For questions specific to the node.js built-in utility function: util.promisify(). When using this tag also include the more generic [node.js] tag.

The utility function: util.promisify() was added in version 8. It is used to convert a -based function to a -based one.

Reference:

49 questions
-1
votes
1 answer

Calling a function after everything else is finished

the function generirajFakturi is used to create some data in a table through sequelize, and after adding everything that it needs to add it should call the function that is at the end dodeliNagradi which is using data from the table that the first…
-1
votes
1 answer

How can return false value promise method in node if array is empty and vise versa

i was trying out promise code but it always returns me resolve even if the user does not exist in the database can anyone help me fix my code and the return statement in the return function the the second console log is only working. here is my…
-1
votes
1 answer

How to solve the problem :Uncaught (in promise) TypeError: promisify is not a function?

Below is my code. I use node v12.16.3 and npm v6.14.4. const GoogleSpreadsheet = require('google-spreadsheet'); const {promisify} = require('util'); const creds = require('./client_secret.json'); And the console showed error like this: Uncaught (in…
p6Chen
  • 1
  • 1
-1
votes
2 answers

subjectify methods with callbacks

I often use the promisify method, which converts a method with a callback signature (e.g. fucntion fn(cb) { ... }) to a method which returns a Promise. It can make the source code a lot cleaner and more compact. So far so good. Slightly different,…
bvdb
  • 22,839
  • 10
  • 110
  • 123
1 2 3
4