作者:可乐加芬达61158 | 来源:互联网 | 2023-09-13 03:09
Ok,soIsawthattocheckifanObjectismomentIneedtocheckwiththemethodmoment.isMoment(ob
Ok, so I saw that to check if an Object
is moment
I need to check with the method moment.isMoment(obj)
but when I try to validate moment().toDate()
it tells me that it's false.
好的,所以我看到要检查一个Object是否需要检查方法moment.isMoment(obj),但是当我尝试验证moment()。toDate()时它会告诉我它是假的。
How may I check if an Object is moment
whether it's .toDate()
or not?
我如何检查对象是否是时刻是否是.toDate()?
moment.isMoment(moment()) // true
moment.isMoment(moment().toDate()) // false
1 个解决方案