@mindfulness/utils
    Preparing search index...

    Function isDate

    • Parameters

      • value: unknown

        The value to check

      Returns value is Date

      True if the given value is a date

      isDate

      Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.

      // For a valid date:
      const result = isDate(new Date())
      //=> true
      // For an invalid date:
      const result = isDate(new Date(NaN))
      //=> true
      // For some value:
      const result = isDate('2014-02-31')
      //=> false
      // For an object:
      const result = isDate({})
      //=> false