( data: any, sources: Set<string>, resolvedStyles: Object, )
| 25 | } |
| 26 | |
| 27 | export function crawlData( |
| 28 | data: any, |
| 29 | sources: Set<string>, |
| 30 | resolvedStyles: Object, |
| 31 | ): void { |
| 32 | if (data == null) { |
| 33 | return; |
| 34 | } |
| 35 | |
| 36 | if (isArray(data)) { |
| 37 | data.forEach(entry => { |
| 38 | if (entry == null) { |
| 39 | return; |
| 40 | } |
| 41 | |
| 42 | if (isArray(entry)) { |
| 43 | crawlData(entry, sources, resolvedStyles); |
| 44 | } else { |
| 45 | crawlObjectProperties(entry, sources, resolvedStyles); |
| 46 | } |
| 47 | }); |
| 48 | } else { |
| 49 | crawlObjectProperties(data, sources, resolvedStyles); |
| 50 | } |
| 51 | |
| 52 | resolvedStyles = Object.fromEntries<string, any>( |
| 53 | Object.entries(resolvedStyles).sort(), |
| 54 | ); |
| 55 | } |
| 56 | |
| 57 | function crawlObjectProperties( |
| 58 | entry: Object, |
no test coverage detected