(source)
| 23 | |
| 24 | /** FNV-1a. Small, synchronous and identical in both hosts, which crypto is not. */ |
| 25 | export function hashSource(source) { |
| 26 | let h = 0x811c9dc5; |
| 27 | for (let i = 0; i < source.length; i += 1) { |
| 28 | h ^= source.charCodeAt(i); |
| 29 | h = Math.imul(h, 0x01000193) >>> 0; |
| 30 | } |
| 31 | return h.toString(16).padStart(8, '0'); |
| 32 | } |
| 33 | |
| 34 | const record = (build, ctx, seed) => { |
| 35 | const { api, ops } = createRecorder({ ...ctx, seed }); |
no outgoing calls
no test coverage detected