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
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict';
|
---|
| 2 | var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
|
---|
| 3 |
|
---|
| 4 | var $RangeError = RangeError;
|
---|
| 5 |
|
---|
| 6 | module.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.