(value)
| 116 | } |
| 117 | |
| 118 | function serializeItems(value) { |
| 119 | if (typeof value === 'string') { |
| 120 | return value; |
| 121 | } |
| 122 | |
| 123 | if (typeof value === 'number') { |
| 124 | const hasDecimals = numberHasDecimals(value); |
| 125 | if (numberIs64Bit(value)) { |
| 126 | if (hasDecimals) { |
| 127 | return java.lang.Double.valueOf(value); |
| 128 | } else { |
| 129 | return java.lang.Long.valueOf(value); |
| 130 | } |
| 131 | } else { |
| 132 | if (hasDecimals) { |
| 133 | return java.lang.Float.valueOf(value); |
| 134 | } else { |
| 135 | return java.lang.Integer.valueOf(value); |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | if (typeof value === 'boolean') { |
| 141 | return java.lang.Boolean.valueOf(value); |
| 142 | } |
| 143 | |
| 144 | if (value instanceof Date) { |
| 145 | return new java.util.Date(value.getTime()); |
| 146 | } |
| 147 | |
| 148 | if (value instanceof Timestamp) { |
| 149 | return value.native; |
| 150 | } |
| 151 | |
| 152 | if (value instanceof GeoPoint) { |
| 153 | return value.native; |
| 154 | } |
| 155 | |
| 156 | if (value instanceof FieldPath) { |
| 157 | return value.native; |
| 158 | } |
| 159 | |
| 160 | if (value instanceof FieldValue) { |
| 161 | return value.native; |
| 162 | } |
| 163 | |
| 164 | if (value instanceof DocumentReference) { |
| 165 | return value.native; |
| 166 | } |
| 167 | |
| 168 | if (value instanceof CollectionReference) { |
| 169 | return value.native; |
| 170 | } |
| 171 | |
| 172 | if (value === null) { |
| 173 | return null; |
| 174 | } |
| 175 |
no test coverage detected
searching dependent graphs…