(a: number, b: number, what: string)
| 63 | }; |
| 64 | |
| 65 | const checkedMul = (a: number, b: number, what: string): number => { |
| 66 | const value = a * b; |
| 67 | if (!Number.isSafeInteger(value)) throw new PackParseError(`${what} exceeds safe integer range`); |
| 68 | return value; |
| 69 | }; |
| 70 | |
| 71 | // sha1 over "type len\0data" to compute object id, needed to key REF_DELTA bases. |
| 72 | // Minimal sha1 (needed because Workers crypto.subtle is async; git object ids are sha1). |
no outgoing calls
no test coverage detected