areInSync(localLastUpdated, serverLastUpdated) | Returns false if: - any of the inputs is not a valid Date - The times don't match |
containsProperties(object, properties) | Returns false if any of the property names listed in properties are not in object |
containsUpdatedProperties(objectUpdates, originalObject) | Returns false if any of the properties in the objectUpdates has the same value in originalObject . Change validation uses == as opposed to === and only works for objects that does not contain nested objects. |
isDateInMs(value) | Returns false if: - value is not a number - value can not be parsed by new Date(value) |
isFirestoreId(id) | Returns false if: - not a valid Firestore id (20 characters a-z, A-Z, and 0-9) |
isFirestoreTimestamp(timestamp) | Returns false if: - not a valid Firestore Timestamp (contains toDate and toMillis functions) |
isNonDeletedObject(object) | Returns false if: - object is not of type object - object.deleted is defined and set to true |
isNonEmptyObject(object) | Returns false if: - object is not of type object - object is empty |
isShortDate(value) | Expects a date with the format (YYYY-MM-DD). Returns false if: - value is not a string with exactly 10 characters - value can not be parsed by new Date(value) |
isTrimmedNonEmptyString(value) | Returns false if: - value is not a string - value is not trimmed - string is empty |