node_modules/@google-cloud/firestore/build/src/write-batch.js
/**
 * Validates a JavaScript object for usage as a Firestore document.
 *
 * @private
 * @param arg The argument name or argument index (for varargs methods).
 * @param obj JavaScript object to validate.
 * @param allowDeletes Whether to allow FieldValue.delete() sentinels.
 * @param allowUndefined Whether to allow nested properties that are `undefined`.
 * @throws when the object is invalid.
 */
Validates a JavaScript object for usage as a Firestore document.
@private
@param arg The argument name or argument index (for varargs methods).
@param obj JavaScript object to validate.
@param allowDeletes Whether to allow FieldValue.delete() sentinels.
@param allowUndefined Whether to allow nested properties that are `undefined`.
@throws when the object is invalid.
Validates a JavaScript object for usage as a Firestore document . @private @param arg The argument name or argument index ( for varargs methods ) . @param obj JavaScript object to validate . @param allowDeletes Whether to allow FieldValue . delete () sentinels . @param allowUndefined Whether to allow nested properties that are ` undefined ` . @throws when the object is invalid .
function validateDocumentData(arg, obj, allowDeletes, allowUndefined) {
    if (!util_1.isPlainObject(obj)) {
        throw new Error(validate_1.customObjectMessage(arg, obj));
    }
    serializer_1.validateUserInput(arg, obj, 'Firestore document', {
        allowDeletes: allowDeletes ? 'all' : 'none',
        allowTransforms: true,
        allowUndefined,
    });
}
function validateDocumentData ( arg , obj , allowDeletes , allowUndefined ) { if ( ! util_1 . isPlainObject ( obj ) ) { throw new Error ( validate_1 . customObjectMessage ( arg , obj ) ) ; } serializer_1 . validateUserInput ( arg , obj , 'Firestore document' , { allowDeletes : allowDeletes ? 'all' : 'none' , allowTransforms : true , allowUndefined , } ) ; }
Validates a JavaScript object for usage as a Firestore document.
Validates a JavaScript object for usage as a Firestore document .