Skip to content

Commit

Permalink
fix: align Node.js and ECMAScript versions (#496)
Browse files Browse the repository at this point in the history
For details please refer to https://node.green/
  • Loading branch information
derevnjuk authored Nov 6, 2023
1 parent 4cc0398 commit 08789d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Archive/Validators/HarValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class HarValidator implements Validator<Har> {
.map(this.parseEntry, this)
.filter((item: string) => !!item);

const targets: string[] = [...new Set(urls).values()];
const targets: string[] = [...new Set(urls)];

return targets.length !== 0;
}
Expand Down
15 changes: 8 additions & 7 deletions src/RequestExecutor/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,17 @@ export class Request {
...headers
};

this._headers = Object.fromEntries(
Object.entries(mergedHeaders).map(
([field, value]: [string, string | string[]]) => [
field,
this._headers = Object.entries(mergedHeaders).reduce(
(result, [field, value]: [string, string | string[]]) => {
result[field] =
Array.isArray(value) &&
Request.SINGLE_VALUE_HEADERS.has(field.toLowerCase())
? value.join(', ')
: value
]
)
: value;

return result;
},
{}
);
}

Expand Down

0 comments on commit 08789d7

Please sign in to comment.