isNaN
node checks if the input value is not a number (NaN). It returns true
if the input is NaN, and false
otherwise.
a
(float, default: 0): The value to check for NaN.result
(boolean): true
if the input is NaN, false
otherwise.isNaN
node is useful when you need to determine if a value is not a valid number. This can be helpful in data validation, error handling, or conditional logic based on the presence of NaN values.
To use the isNaN
node:
a
input port.result
output port will emit true
if the input is NaN, and false
otherwise.result
output in your spell logic as needed, such as in a branch node or as a condition for further processing.isNaN
node in a spell:
input/number
node allows the user to enter a number.isNaN
node checks if the input number is NaN.logic/branch
node uses the result
from isNaN
to conditionally route the flow.isNaN
node when you need to explicitly check for NaN values, such as in data validation or error handling scenarios.isNaN
only checks for NaN values, not other types of invalid numbers like infinity or undefined.isNaN
node is of type float
. Connecting a non-float value may lead to unexpected behavior.isNaN
will return false
for non-numeric values like strings or booleans. If you need to check for these cases, consider using additional type-checking nodes.