Nucleus handler tools βΊ Docs βΊ Checks
A comparison with NaN
Why it matters
Nothing equals NaN, not even NaN: this comparison is always false. Use isNaN(x).
Example
β Wrong
var n = Number("x");
if (n == NaN) {
}β Right
var n = Number("x");
if (isNaN(n)) {
}How to fix it
Use isNaN(x).
Turn it off, or change how it shows
Each check can be shown as an error, warning, info or hint, or turned off. VS Code: "splitscreenme.lint.rules": { "use-isnan": "off" } in your settings. Notepad++: Plugins βΊ Nucleus Co-op handlers βΊ Settings. Command line: ncdev lint --rule use-isnan=off. Other editors: the lint.rules setting of ncdev lsp.
Is this right?
Tell us what's wrong