(config: object)
| 108 | |
| 109 | // functions can't be compared |
| 110 | export const fingerprintOf = (config: object): string => { |
| 111 | const text = staticTextOf(config, []) |
| 112 | let a = 1 |
| 113 | let b = 2 |
| 114 | for (let i = 0; i < text.length; i++) { |
| 115 | a = Math.imul(a ^ text.charCodeAt(i), 2654435761) |
| 116 | b = Math.imul(b ^ text.charCodeAt(i), 1597334677) |
| 117 | } |
| 118 | return `${(a >>> 0).toString(36)}_${(b >>> 0).toString(36)}` |
| 119 | } |
| 120 | |
| 121 | const staticTextOf = (value: unknown, seen: unknown[]): string => { |
| 122 | if ( |
no test coverage detected