source: imaps-frontend/node_modules/is-date-object/README.md@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.9 KB
Line 
1# is-date-object <sup>[![Version Badge][2]][1]</sup>
2
3[![github actions][actions-image]][actions-url]
4[![coverage][codecov-image]][codecov-url]
5[![dependency status][5]][6]
6[![dev dependency status][7]][8]
7[![License][license-image]][license-url]
8[![Downloads][downloads-image]][downloads-url]
9
10[![npm badge][11]][1]
11
12Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
13
14## Example
15
16```js
17var isDate = require('is-date-object');
18var assert = require('assert');
19
20assert.notOk(isDate(undefined));
21assert.notOk(isDate(null));
22assert.notOk(isDate(false));
23assert.notOk(isDate(true));
24assert.notOk(isDate(42));
25assert.notOk(isDate('foo'));
26assert.notOk(isDate(function () {}));
27assert.notOk(isDate([]));
28assert.notOk(isDate({}));
29assert.notOk(isDate(/a/g));
30assert.notOk(isDate(new RegExp('a', 'g')));
31
32assert.ok(isDate(new Date()));
33```
34
35## Tests
36Simply clone the repo, `npm install`, and run `npm test`
37
38[1]: https://npmjs.org/package/is-date-object
39[2]: https://versionbadg.es/inspect-js/is-date-object.svg
40[5]: https://david-dm.org/inspect-js/is-date-object.svg
41[6]: https://david-dm.org/inspect-js/is-date-object
42[7]: https://david-dm.org/inspect-js/is-date-object/dev-status.svg
43[8]: https://david-dm.org/inspect-js/is-date-object#info=devDependencies
44[11]: https://nodei.co/npm/is-date-object.png?downloads=true&stars=true
45[license-image]: https://img.shields.io/npm/l/is-date-object.svg
46[license-url]: LICENSE
47[downloads-image]: https://img.shields.io/npm/dm/is-date-object.svg
48[downloads-url]: https://npm-stat.com/charts.html?package=is-date-object
49[codecov-image]: https://codecov.io/gh/inspect-js/is-date-object/branch/main/graphs/badge.svg
50[codecov-url]: https://app.codecov.io/gh/inspect-js/is-date-object/
51[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-date-object
52[actions-url]: https://github.com/inspect-js/is-date-object/actions
Note: See TracBrowser for help on using the repository browser.