summaryrefslogtreecommitdiffstats
path: root/node_modules/is-date-object/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/is-date-object/index.js')
-rw-r--r--node_modules/is-date-object/index.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/node_modules/is-date-object/index.js b/node_modules/is-date-object/index.js
deleted file mode 100644
index 285ec4c..0000000
--- a/node_modules/is-date-object/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-var getDay = Date.prototype.getDay;
-var tryDateObject = function tryDateGetDayCall(value) {
- try {
- getDay.call(value);
- return true;
- } catch (e) {
- return false;
- }
-};
-
-var toStr = Object.prototype.toString;
-var dateClass = '[object Date]';
-var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
-
-module.exports = function isDateObject(value) {
- if (typeof value !== 'object' || value === null) {
- return false;
- }
- return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
-};