Sha256: 5342554adb21f1651e12b871be9f8d85ad851c0a07c5c3d93a80ae720fc8beb9
Contents?: true
Size: 551 Bytes
Versions: 67
Compression:
Stored size: 551 Bytes
Contents
'use strict'; var getDay = Date.prototype.getDay; var tryDateObject = function tryDateObject(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; };
Version data entries
67 entries across 67 versions & 10 rubygems