main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
291 bytes
|
Rev | Line | |
---|
[79a0317] | 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.