This commit is contained in:
2025-05-24 02:39:24 +04:00
parent 78fa452d28
commit 7b5012a6e8
10287 changed files with 948156 additions and 0 deletions

27
node_modules/is-date-object/index.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
'use strict';
var callBound = require('call-bound');
var getDay = callBound('Date.prototype.getDay');
/** @type {import('.')} */
var tryDateObject = function tryDateGetDayCall(value) {
try {
getDay(value);
return true;
} catch (e) {
return false;
}
};
/** @type {(value: unknown) => string} */
var toStr = callBound('Object.prototype.toString');
var dateClass = '[object Date]';
var hasToStringTag = require('has-tostringtag/shams')();
/** @type {import('.')} */
module.exports = function isDateObject(value) {
if (typeof value !== 'object' || value === null) {
return false;
}
return hasToStringTag ? tryDateObject(value) : toStr(value) === dateClass;
};