uni-ticket-system/node_modules/core-js/internals/to-positive-integer.js

10 lines
273 B
JavaScript
Raw Normal View History

2023-12-05 02:11:10 +00:00
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
var $RangeError = RangeError;
module.exports = function (it) {
var result = toIntegerOrInfinity(it);
if (result < 0) throw $RangeError("The argument can't be less than 0");
return result;
};