numaeric add function firestore code example
Example 1: Firestore increment field
const userRef = db.collection('documents').doc('document_id');
const increment = firebase.firestore.FieldValue.increment(1);
userRef.update({ FieldToIncrease: increment });
Example 2: firestore set a document
let data = {
name: 'Los Angeles',
state: 'CA',
country: 'USA'
};
// Add a new document in collection "cities" with ID 'LA'
let setDoc = db.collection('cities').doc('LA').set(data);