After doing some research, I discovered that in order to determine if an Object
is a moment
, the method moment.isMoment(obj)
needs to be used. However, when attempting to confirm moment().toDate()
, it returned false.
Is there a way to verify if an Object is a moment
, regardless of whether it includes .toDate()
or not?
moment.isMoment(moment()) // true
moment.isMoment(moment().toDate()) // false