to-positive-integer.js 209 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 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; };