valid-date.js 232 B

12345678910
  1. "use strict";
  2. module.exports = function (t, a) {
  3. var d = new Date();
  4. a(t(d), d, "Date");
  5. a.throws(function () { t({}); }, "Object");
  6. a.throws(function () {
  7. t({ valueOf: function () { return 20; } });
  8. }, "Number object");
  9. };