root 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
..
.github 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
test 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
.editorconfig 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
.eslintignore 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
.eslintrc 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
.nycrc 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
CHANGELOG.md 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
LICENSE 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
README.md 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
index.js 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos
package.json 7621d6d22a 221005-1449-Kim %!s(int64=2) %!d(string=hai) anos

README.md

is-date-object Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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