Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ function createNameTable(name, proto) {
proto[0][8] || "Unknown", // 8.Manufacturer
proto[0][9] || "Unknown", // 9.Designer
];
const stringsBytes = strings.map(s => stringToBytes(s));
const stringsBytes = strings.map(stringToBytes);

// Mac want 1-byte per character strings while Windows want
// 2-bytes per character, so duplicate the names table
Expand Down
2 changes: 1 addition & 1 deletion src/core/struct_tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ class StructElementNode {
if (Array.isArray(headers)) {
const ids = headers
.filter(header => typeof header === "string")
.map(header => stringToPDFString(header));
.map(stringToPDFString);
if (ids.length > 0) {
map.set("headers", ids);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/xfa/xhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class XhtmlObject extends XmlObject {
xfaFont.letterSpacing = getMeasurement(value);
break;
case "margin":
const values = value.split(/ \t/).map(x => getMeasurement(x));
const values = value.split(/ \t/).map(getMeasurement);
switch (values.length) {
case 1:
margin.top =
Expand Down
4 changes: 2 additions & 2 deletions src/display/annotation_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,8 @@ class AnnotationElement {
return;
}

const [rectBlX, rectBlY, rectTrX, rectTrY] = this.data.rect.map(x =>
Math.fround(x)
const [rectBlX, rectBlY, rectTrX, rectTrY] = this.data.rect.map(
Math.fround
);

if (quadPoints.length === 8) {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/freetext_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ describe("FreeText Editor", () => {
}, proprName);

const rects = (await serialize("rect")).map(rect =>
rect.slice(0, 2).map(x => Math.floor(x))
rect.slice(0, 2).map(Math.floor)
);
const expected = [
[-28, 695],
Expand Down
Loading