valid-date.js 184 B

12345678
  1. "use strict";
  2. var isDate = require("./is-date");
  3. module.exports = function (value) {
  4. if (!isDate(value)) throw new TypeError(value + " is not valid Date object");
  5. return value;
  6. };