(cache: NodeCache, hash: string)
| 307 | let hashedInJob: NodeCache[] = [] |
| 308 | |
| 309 | const keptForJob = (cache: NodeCache, hash: string): string => { |
| 310 | if (hash.length > 256 && hashedInJob.push(cache) === 1) { |
| 311 | void Promise.resolve().then(() => { |
| 312 | for (const cache of hashedInJob) cache.innerHash = cache.hash = undefined |
| 313 | hashedInJob = [] |
| 314 | }) |
| 315 | } |
| 316 | return hash |
| 317 | } |
| 318 | |
| 319 | // past this length, a hash is a prefix of the JSON, by which siblings still sort, and a digest |
| 320 | const maxPlainHashLength = 65_536 |