skip to Main Content

Javascript – How to share data between concurrently executed promises in NodeJS

I want to share data between the two concurrent method calls shown below. async generateSuggestedSparks(userId: GraphID, friends: Person[], latLng: LatLng) { let suggestions = await this.generateAndMergeListsInParallel([ this.generateHardCodedSparks(userId, friends, latLng), this.generateRandomActivitySparks(userId, friends, latLng, 6), ]); suggestions = this.filterDuplicateSuggestions(suggestions); return suggestions.slice(0, 7);…

VIEW QUESTION
Back To Top
Search