Skip to content

Commit

Permalink
Code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Jan 27, 2024
1 parent 8b8eed7 commit 469961f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class Client {
if (!Array.isArray(value)) body.set(key, value);
else {
let index = 0;
value.forEach(item => body.set(`${key}[${index++}]`, item));
for (const item of value) body.set(`${key}[${index++}]`, item);
}

const response = await fetch(new URL(endpoint, this.baseUrl), {method: "POST", headers: {"User-Agent": this.userAgent}, body});
Expand Down
2 changes: 1 addition & 1 deletion tool/doc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {cpSync} from "node:fs";

// Builds the documentation.
["CHANGELOG.md", "LICENSE.md"].forEach(file => cpSync(file, `docs/${file.toLowerCase()}`));
for (const file of ["CHANGELOG.md", "LICENSE.md"]) cpSync(file, `docs/${file.toLowerCase()}`);
cpSync("docs/favicon.ico", "docs/api/favicon.ico");

0 comments on commit 469961f

Please sign in to comment.