(obj: any)
| 14 | const uri = Image.resolveAssetSource(source)?.uri ?? ''; |
| 15 | |
| 16 | function serialize(obj: any): string { |
| 17 | if (obj == null) { |
| 18 | return ''; |
| 19 | } |
| 20 | |
| 21 | if (typeof obj !== 'object') { |
| 22 | return String(obj); |
| 23 | } |
| 24 | |
| 25 | if (Array.isArray(obj)) { |
| 26 | return obj.map(serialize).join(','); |
| 27 | } |
| 28 | |
| 29 | return Object.entries(obj) |
| 30 | .sort(([a], [b]) => a.localeCompare(b)) |
| 31 | .map(([k, v]) => `${k}:${serialize(v)}`) |
| 32 | .join(','); |
| 33 | } |
| 34 | |
| 35 | const optionsStr = serialize(options); |
| 36 |