Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- Replace global isFinite with Number.isFinite for safer numeric validation
- Enable useArrowFunction lint rule to prefer arrow functions for cleaner syntax
- Enable noUselessCatch lint rule to prevent useless catch blocks that only rethrow errors
- Enable noArguments rule to enforce modern rest parameters instead of legacy arguments object

## v0.10.9
- Add support for IPv6 urls
Expand Down
8 changes: 4 additions & 4 deletions bin/generate-defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ const PROPERTIES_OVERHEAD = FRAME_OVERHEAD + 4 + 8 + 2;

const out = process.stdout;

function printf() {
out.write(format.apply(format, arguments), 'utf8');
function printf(...args) {
out.write(format.apply(format, args), 'utf8');
}

function nl() {
out.write('\n');
}
function println() {
printf.apply(printf, arguments);
function println(...args) {
printf.apply(printf, args);
nl();
}

Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"noUselessCatch": "error",
"useArrowFunction": "error",
"useOptionalChain": "off",
"noArguments": "off",
"noArguments": "error",
"useLiteralKeys": "off"
},
"suspicious": {
Expand Down
4 changes: 2 additions & 2 deletions lib/callback_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CallbackModel extends EventEmitter {
}

createChannel(options, cb) {
if (arguments.length === 1) {
if (cb === undefined) {
cb = options;
options = undefined;
}
Expand All @@ -36,7 +36,7 @@ class CallbackModel extends EventEmitter {
}

createConfirmChannel(options, cb) {
if (arguments.length === 1) {
if (cb === undefined) {
cb = options;
options = undefined;
}
Expand Down