tree: 185ca27182a1d95fcf18dac42f133136d09f7931 [path history] [tgz]
  1. .eslintrc
  2. .jscs.json
  3. .npmignore
  4. .travis.yml
  5. CHANGELOG.md
  6. index.js
  7. LICENSE
  8. Makefile
  9. package.json
  10. README.md
  11. test.js
src/third_party/devtools/node_modules/is-date-object/README.md

is-date-object Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

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