What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-13 23:56:17
code in nested forEach loop- react native
const nestedPromise = async (items = []) => { return await Promise.all( items.map(async item => { if (Array.isArray(item) && item.length) { return await nestedPromise(item) } // return await call to your funct... Add solution -
Javascript 2021-10-25 05:24:11
Manually Parsing PDF in Node.js
/* This code comes from Vincent Lab And it has a video version linked here: https://www.youtube.com/watch?v=b2dLDqmYT4I */ // Import dependencies const fs = require("fs"); const PDFParser = require("pdf2json"); // Get all the... Add solution -
Javascript 2021-09-27 23:12:05
promise.all map statement
//Here i have filmresponse.json() which will return promise so i uses promise. //all otherwise it won't be possible to run it let characterResponse = await fetch('http://swapi.co/api/people/2/') let characterResponseJson = await characterResponse.json()... Add solution -
Javascript 2021-08-27 13:55:01
use axios with Promise.all
const axios = require('axios'); const someFunction = () => { return new Promise(resolve => { setTimeout(() => resolve('222'), 100) }) } const requestsData = ['https://httpstat.us/200', 'https://httpstat.us/205', 'https://httpsta... Add solution