* Converts a given storage data to its string representation. * @param key key of the storage data * @returns {string} string representation
(key)
| 50 | * @returns {string} string representation |
| 51 | */ |
| 52 | function storageDataAsString(key) { |
| 53 | let value = storage[key]; |
| 54 | |
| 55 | switch (key) { |
| 56 | case "ClearURLsData": |
| 57 | case "log": |
| 58 | return JSON.stringify(value); |
| 59 | case "types": |
| 60 | return value.toString(); |
| 61 | default: |
| 62 | return value; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Delete key from browser storage. |
no test coverage detected