8 lines
197 B
JavaScript
Raw Normal View History

2024-04-28 15:34:17 +08:00
var $RangeError = RangeError;
module.exports = function (it) {
// eslint-disable-next-line no-self-compare -- NaN check
if (it === it) return it;
throw $RangeError('NaN is not allowed');
};