Spaces:
Runtime error
Runtime error
File size: 325 Bytes
b5ea024 |
1 2 3 4 5 6 7 8 9 10 11 |
"use strict";
var safeToString = require("../safe-to-string")
, toInteger = require("../number/to-integer")
, isTimeValue = require("./is-time-value");
module.exports = function (value) {
if (isTimeValue(value)) return toInteger(value);
throw new TypeError(safeToString(value) + " is not a valid time value");
};
|