arvin.torres e3ca5d94a7 Campanas de Paz para la Mujer | 5 lat temu | |
---|---|---|
.. | ||
.eslintrc | 5 lat temu | |
.jscs.json | 5 lat temu | |
.npmignore | 5 lat temu | |
.travis.yml | 5 lat temu | |
CHANGELOG.md | 5 lat temu | |
LICENSE | 5 lat temu | |
Makefile | 5 lat temu | |
README.md | 5 lat temu | |
index.js | 5 lat temu | |
package.json | 5 lat temu | |
test.js | 5 lat temu |
Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
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()));
Simply clone the repo, npm install
, and run npm test