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 @@ -19,6 +19,7 @@
- Remove redundant 'use strict' directives as modules are automatically in strict mode
- Refactor assignment-in-expression patterns to improve code clarity and readability
- Enforce strict equality checks (=== and !==) instead of loose equality (== and !=)
- Replace global isNaN with Number.isNaN for safer type checking

## v0.10.9
- Add support for IPv6 urls
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"suspicious": {
"noRedundantUseStrict": "error",
"noAsyncPromiseExecutor": "off",
"noGlobalIsNan": "off",
"noGlobalIsNan": "error",
"noRedeclare": "off",
"noGlobalIsFinite": "off",
"noPrototypeBuiltins": "off",
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/callback_api/rpc_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {v4: uuid} = require('uuid');
const queue = 'rpc_queue';

const n = parseInt(process.argv[2], 10);
if (isNaN(n)) {
if (Number.isNaN(n)) {
console.warn('Usage: %s number', basename(process.argv[1]));
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/rpc_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {v4: uuid} = require('uuid');
const queue = 'rpc_queue';

const n = parseInt(process.argv[2], 10);
if (isNaN(n)) {
if (Number.isNaN(n)) {
console.warn('Usage: %s number', basename(process.argv[1]));
process.exit(1);
}
Expand Down
6 changes: 3 additions & 3 deletions test/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function toFloat32(i) {
function floatChooser(maxExp) {
return function () {
let n = Number.NaN;
while (isNaN(n)) {
while (Number.isNaN(n)) {
const mantissa = Math.random() * 2 - 1;
const exponent = chooseInt(0, maxExp);
n = mantissa ** exponent;
Expand Down Expand Up @@ -268,13 +268,13 @@ const domainProps = [
[
Double,
function (f) {
return !isNaN(f) && isFinite(f);
return !Number.isNaN(f) && isFinite(f);
},
],
[
Float,
function (f) {
return !isNaN(f) && isFinite(f) && Math.log(Math.abs(f)) * Math.LOG10E < 309;
return !Number.isNaN(f) && isFinite(f) && Math.log(Math.abs(f)) * Math.LOG10E < 309;
},
],
[
Expand Down