0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/deps/npm/node_modules/is-date-object
claudiahdz a7c7c703af
deps: upgrade npm to 6.13.1
PR-URL: https://github.com/nodejs/node/pull/30533
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-11-20 19:16:47 -05:00
..
.jscs.json deps: upgrade npm to 6.13.1 2019-11-20 19:16:47 -05:00
.npmignore
.travis.yml
CHANGELOG.md
index.js
LICENSE deps: upgrade npm to 6.13.1 2019-11-20 19:16:47 -05:00
Makefile
package.json
README.md
test.js

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