Open kungfooman opened 10 months ago
Currently it has some issues with false positives:
["str", "1", "NaN", NaN, new Date].map(isNaN); // Outputs: [true, false, true, true, false]
It tests for: undefined / null / NaN / infinity... but it seems we also need a simple typeof check:
validateNumber(["1", 2, 3], 0); // Approved, but it should fail
https://github.com/kungfooman/RuntimeTypeInspector.js/blob/da93e3c51d35df938e33cb695d23af09fa6ad9a6/src-runtime/validateNumber.mjs#L8-L28
And then I also have to fix validateNumber @todo note in validateType.
Currently it has some issues with false positives:
It tests for: undefined / null / NaN / infinity... but it seems we also need a simple typeof check:
https://github.com/kungfooman/RuntimeTypeInspector.js/blob/da93e3c51d35df938e33cb695d23af09fa6ad9a6/src-runtime/validateNumber.mjs#L8-L28
And then I also have to fix validateNumber @todo note in validateType.