playwright-core1.65.13.5 MB
Shown as plain text from the published tarball, after apm checked it against the version's checksum. Nothing in it runs on this page.
}
function isLosslessWebp(buffer) {
if (buffer.length < 16 || buffer.toString("ascii", 0, 4) !== "RIFF" || buffer.toString("ascii", 8, 12) !== "WEBP")
return false;
let offset = 12;
while (offset + 8 <= buffer.length) {
const fourcc = buffer.toString("ascii", offset, offset + 4);
if (fourcc === "VP8L")
return true;
if (fourcc === "VP8 ")
return false;
const size = buffer.readUInt32LE(offset + 4);
offset += 8 + size + (size & 1);
}
return false;
}
var import_fs, import_path2, import_webp_codec, module2;
var init_webp = __esm({
"packages/utils/webp/webp.ts"() {
"use strict";
import_fs = __toESM(require("fs"));
import_path2 = __toESM(require("path"));
import_webp_codec = __toESM(require_webp_codec());
}
});
// packages/utils/comparators.ts
function getComparator(mimeType) {
if (mimeType === "image/png")
return compareImages.bind(null, "image/png");
if (mimeType === "image/jpeg")
return compareImages.bind(null, "image/jpeg");
if (mimeType === "image/webp")
return compareImages.bind(null, "image/webp");
if (mimeType === "text/plain")
return compareText;
return compareBuffersOrStrings;
}
function compareBuffersOrStrings(actualBuffer, expectedBuffer) {
if (typeof actualBuffer === "string")
return compareText(actualBuffer, expectedBuffer);
This file is 3.5 MB, over the 1.0 MB the full view shows, so apm shows the lines around the cited one. Lines longer than 4 kB are cut.