is-date-object ![Version Badge](https://camo.githubusercontent.com/9153f2c685169e03167af0c602085505c7b0b5a45a9a5636809060c73bcf8ee3/687474703a2f2f76657273696f6e626164672e65732f6c6a686172622f69732d646174652d6f626a6563742e737667)
Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Example
var isDate = require('is-date-object');
var assert = require('assert');
assert.notOk(isDate(undefined));
assert.notOk(isDate(null));
assert.notOk(isDate(false));
assert.notOk(isDate(true));
assert.notOk(isDate(42));
assert.notOk(isDate('foo'));
assert.notOk(isDate(function () {}));
assert.notOk(isDate([]));
assert.notOk(isDate({}));
assert.notOk(isDate(/a/g));
assert.notOk(isDate(new RegExp('a', 'g')));
assert.ok(isDate(new Date()));
Tests
Simply clone the repo, npm install
, and run npm test