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:
parent
4e58dabb32
commit
60f6272ed9
16 changed files with 70 additions and 101 deletions
|
@ -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("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue