source: node_modules/core-js-pure/internals/to-positive-integer.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 291 bytes
Line 
1'use strict';
2var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
3
4var $RangeError = RangeError;
5
6module.exports = function (it) {
7 var result = toIntegerOrInfinity(it);
8 if (result < 0) throw new $RangeError("The argument can't be less than 0");
9 return result;
10};
Note: See TracBrowser for help on using the repository browser.