You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
288 B
11 lines
288 B
2 years ago
|
"use strict";
|
||
|
|
||
|
var toPosInt = require("es5-ext/number/to-pos-integer")
|
||
|
, maxTimeout = require("./max-timeout");
|
||
|
|
||
|
module.exports = function (value) {
|
||
|
value = toPosInt(value);
|
||
|
if (value > maxTimeout) throw new TypeError(value + " exceeds maximum possible timeout");
|
||
|
return value;
|
||
|
};
|