Iterate over async function

前端 未结 3 729
闹比i
闹比i 2021-01-07 00:17

I have a function that uses the module cherio to get data from a website.

Now I\'d like to iterate this function over an array of keywords, collect the intermediate

3条回答
  •  时光说笑
    2021-01-07 01:10

    Other the usual (and correct) way you use to solve the problem, there are some modules that let you write code that is synchronous, if you really want.

    Try to google for "nodejs synchronous" give as result some link to nodejs modules and/or methodologies to write synchronous code in nodejs, but I suppose they are usefull only to some specific problem (never used them myself)

提交回复
热议问题