Skip to content

Instantly share code, notes, and snippets.

View IsroilovIbrohim's full-sized avatar

Isroilov Ibrohim(힘) IsroilovIbrohim

View GitHub Profile
@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active November 13, 2024 13:53
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for...i or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem

@jofftiquez
jofftiquez / firebase-admin-multi-apps-init-ES6.md
Last active March 12, 2024 01:29
Firebase admin - how to initialise multiple applications in ES6 nodejs.

Firebase Admin Multi App Initialization - ES6

This is a snippet that uses firebase's firebase-admin to initialize multiple firebase projects in one admin application.

ES5 version

Using ES6

import 'firebase';