MCPcopy Create free account
hub / github.com/NativeScript/firebase / createDictionary

Function createDictionary

packages/firebase-firestore/index.android.ts:197–214  ·  view source on GitHub ↗
(field: any, value?: any, moreFieldsAndValues?: any)

Source from the content-addressed store, hash-verified

195}
196
197function createDictionary(field: any, value?: any, moreFieldsAndValues?: any) {
198 const data = new java.util.HashMap();
199 if (field instanceof FieldPath) {
200 data.put(field.native as any, value?.native || value);
201 } else {
202 data.put(field, value?.native || value);
203 }
204
205 if (Array.isArray(moreFieldsAndValues)) {
206 for (let i = 0; i < moreFieldsAndValues.length; i += 2) {
207 const key = moreFieldsAndValues[i];
208 const value = moreFieldsAndValues[i + 1];
209 data.put(key?.native || key, value?.native || value);
210 }
211 }
212
213 return data;
214}
215
216export class Transaction implements ITransaction {
217 _native: com.google.firebase.firestore.Transaction;

Callers

nothing calls this directly

Calls 1

putMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…