| 163 | } |
| 164 | |
| 165 | function trimRemoteObject(result) { |
| 166 | if (result === undefined || result === null || typeof result !== 'object') { |
| 167 | return result; |
| 168 | } |
| 169 | |
| 170 | if (ArrayIsArray(result)) { |
| 171 | return ArrayPrototypeMap(result, trimRemoteObject); |
| 172 | } |
| 173 | |
| 174 | const trimmed = { __proto__: null }; |
| 175 | for (const { 0: key, 1: value } of ObjectEntries(result)) { |
| 176 | if (key === 'objectId' || key === 'className') { |
| 177 | continue; |
| 178 | } |
| 179 | trimmed[key] = trimRemoteObject(value); |
| 180 | } |
| 181 | return trimmed; |
| 182 | } |
| 183 | |
| 184 | function stripProbePreviews(value) { |
| 185 | if (value === undefined || value === null || typeof value !== 'object') { |