MCPcopy Create free account
hub / github.com/chavyleung/scripts / mergePromise

Function mergePromise

hellobike/hellobike.js:227–237  ·  view source on GitHub ↗
(promises = [])

Source from the content-addressed store, hash-verified

225}
226
227function mergePromise(promises = []) {
228 let array = []
229 let sequence = Promise.resolve([])
230 promises.forEach(promise => {
231 sequence = sequence.then(() => promise).then(data => {
232 array.push(data)
233 return array
234 })
235 })
236 return sequence
237}
238
239function init() {
240 isSurge = () => {

Callers 1

hellobike.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected