Opal-Estate-Pro/node_modules/timers-ext/valid-timeout.js
2019-09-13 11:27:52 +07:00

11 lines
288 B
JavaScript
Executable File

"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;
};