Sha256: 1467176edee3535184b1add589486440e2138456b1c87b185b0c3ca3af116d0f

Contents?: true

Size: 1.71 KB

Versions: 80

Compression:

Stored size: 1.71 KB

Contents

# is-date-object <sup>[![Version Badge][2]][1]</sup>

[![Build Status][3]][4]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][11]][1]

[![browser support][9]][10]

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

## Example

```js
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`

[1]: https://npmjs.org/package/is-date-object
[2]: http://versionbadg.es/ljharb/is-date-object.svg
[3]: https://travis-ci.org/ljharb/is-date-object.svg
[4]: https://travis-ci.org/ljharb/is-date-object
[5]: https://david-dm.org/ljharb/is-date-object.svg
[6]: https://david-dm.org/ljharb/is-date-object
[7]: https://david-dm.org/ljharb/is-date-object/dev-status.svg
[8]: https://david-dm.org/ljharb/is-date-object#info=devDependencies
[9]: https://ci.testling.com/ljharb/is-date-object.png
[10]: https://ci.testling.com/ljharb/is-date-object
[11]: https://nodei.co/npm/is-date-object.png?downloads=true&stars=true
[license-image]: http://img.shields.io/npm/l/is-date-object.svg
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/is-date-object.svg
[downloads-url]: http://npm-stat.com/charts.html?package=is-date-object

Version data entries

80 entries across 79 versions & 15 rubygems

Version Path
govuk_publishing_components-17.13.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.12.2 node_modules/is-date-object/README.md
govuk_publishing_components-17.12.1 node_modules/is-date-object/README.md
govuk_publishing_components-17.12.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.11.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.10.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.9.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.8.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.7.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.6.1 node_modules/is-date-object/README.md
govuk_publishing_components-17.6.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.5.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.4.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.3.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.2.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.1.1 node_modules/is-date-object/README.md
govuk_publishing_components-17.1.0 node_modules/is-date-object/README.md
govuk_publishing_components-17.0.0 node_modules/is-date-object/README.md
govuk_publishing_components-16.29.0 node_modules/is-date-object/README.md
govuk_publishing_components-16.28.0 node_modules/is-date-object/README.md