Ignore:
Timestamp:
01/21/25 03:08:24 (2 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
0c6b92a
Message:

F4 Finalna Verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/is-date-object/index.js

    r0c6b92a r79a0317  
    11'use strict';
    22
    3 var getDay = Date.prototype.getDay;
     3var callBound = require('call-bound');
     4
     5var getDay = callBound('Date.prototype.getDay');
     6/** @type {import('.')} */
    47var tryDateObject = function tryDateGetDayCall(value) {
    58        try {
    6                 getDay.call(value);
     9                getDay(value);
    710                return true;
    811        } catch (e) {
     
    1114};
    1215
    13 var toStr = Object.prototype.toString;
     16/** @type {(value: unknown) => string} */
     17var toStr = callBound('Object.prototype.toString');
    1418var dateClass = '[object Date]';
    1519var hasToStringTag = require('has-tostringtag/shams')();
    1620
     21/** @type {import('.')} */
    1722module.exports = function isDateObject(value) {
    1823        if (typeof value !== 'object' || value === null) {
    1924                return false;
    2025        }
    21         return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
     26        return hasToStringTag ? tryDateObject(value) : toStr(value) === dateClass;
    2227};
Note: See TracChangeset for help on using the changeset viewer.