(obj: T)
| 197 | // NOTE: This function should not be called from native. On native, we should |
| 198 | // use `convertObjToBytes` in native/backup/conversion-utils.js instead. |
| 199 | function convertObjToBytes<T>(obj: T): Uint8Array { |
| 200 | const objStr = JSON.stringify(obj); |
| 201 | return new TextEncoder().encode(objStr ?? ''); |
| 202 | } |
| 203 | |
| 204 | // NOTE: This function should not be called from native. On native, we should |
| 205 | // use `convertBytesToObj` in native/backup/conversion-utils.js instead. |
no test coverage detected