mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 13:14:44 +00:00
.
This commit is contained in:
parent
9fff29ba6c
commit
00c3b50fca
7278 changed files with 0 additions and 1778943 deletions
20
node_modules/is-date-object/index.js
generated
vendored
20
node_modules/is-date-object/index.js
generated
vendored
|
@ -1,20 +0,0 @@
|
|||
'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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue