How to avoid loops when writing cloud functions?
问题 When writing event based cloud functions for firebase firestore it's common to update fields in the affected document, for example: When a document of users collection is updated a function will trigger, let's say we want to determine the user info state and we have a completeInfo: boolean property, the function will have to perform another update so that the trigger will fire again, if we don't use a flag like needsUpdate: boolean to determine if excecuting the function we will have an