1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Use more for...of loops in the code-base

Most, if not all, of this code is old enough to predate the general availability of `for...of` iteration.
This commit is contained in:
Jonas Jenwald 2022-10-03 12:33:49 +02:00
parent 4e58dabb32
commit 60f6272ed9
16 changed files with 70 additions and 101 deletions

View file

@ -1407,8 +1407,8 @@ class PDFDocument {
function hexString(hash) {
const buf = [];
for (let i = 0, ii = hash.length; i < ii; i++) {
const hex = hash[i].toString(16);
for (const num of hash) {
const hex = num.toString(16);
buf.push(hex.padStart(2, "0"));
}
return buf.join("");