travel/admin/node_modules/core-js/internals/to-positive-integer.js

8 lines
209 B
JavaScript
Raw Normal View History

2024-06-24 11:28:18 +08:00
var toInteger = require('../internals/to-integer');
module.exports = function (it) {
var result = toInteger(it);
if (result < 0) throw RangeError("The argument can't be less than 0");
return result;
};