Socket
Socket
Sign inDemoInstall

is-date-object

Package Overview
Dependencies
2
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-date-object

Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.


Version published
Maintainers
1
Weekly downloads
29,663,520
decreased by-8.45%

Weekly downloads

Readme

Source

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

Keywords

FAQs

Last updated on 05 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc