debian-mirror-gitlab/core-js/internals/to-positive-integer.js
2019-10-31 01:37:42 +05:30

7 lines
209 B
JavaScript

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;
};