* Retrieves the cached result with the last checked timestamp. * @returns {object|null} An object containing the result and lastChecked, or null if not set.
()
| 9 | * @returns {object|null} An object containing the result and lastChecked, or null if not set. |
| 10 | */ |
| 11 | getResult() { |
| 12 | if (!this.result) { |
| 13 | return null; |
| 14 | } |
| 15 | |
| 16 | return Object.assign({}, this.result, { |
| 17 | lastChecked: this.lastChecked ? new Date(this.lastChecked).toISOString() : null, |
| 18 | }); |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * Retrieves the last checked timestamp. |
no outgoing calls
no test coverage detected