| 1 |
"use strict"; |
| 2 |
|
| 3 |
var toPosInt = require("es5-ext/number/to-pos-integer") |
| 4 |
, maxTimeout = require("./max-timeout"); |
| 5 |
|
| 6 |
module.exports = function (value) { |
| 7 |
value = toPosInt(value); |
| 8 |
if (value > maxTimeout) throw new TypeError(value + " exceeds maximum possible timeout"); |
| 9 |
return value; |
| 10 |
}; |