File size: 288 Bytes
b5ea024
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
"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;
};