1var db = firebase.firestore();
2var batch = db.batch()
3
4save(docs: any[]) {
5 docs.forEach((doc) => {
6 var docRef = db.collection("col").doc(); //automatically generate unique id
7 batch.set(docRef, doc);
8 });
9 return batch.commit();
10}
11