valid-date.js 236 B

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