-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moment() instanceof moment fails #2640
Comments
moment.isMoment( moment() ); // true |
That is an interesting position. The jQuery library documents Why not do both and make the library easy to use and standards compliant for those wishing to use |
this is interesting. I mean it's good to make sure the operator instanceof works for moment. So any reason for not doing this? Checked the code, It should be easy to do it. |
make the operator instanceof support for moment
make the operator instanceof support for moment (reverted from commit 623d1d2)
fix issue #2640: support instanceof operator
Fixed in aee4e2f |
Can it made so that the javascript standard way of finding out what an object IS works with moment? With the latest version using
moment() instanceof moment
returnsfalse
.I can put
moment.prototype = moment.fn
at the beginning of my code and thenmoment() instanceof moment
returnstrue
and everything seems fine in the ways I am using moment. However, there may be some case where this does not work so it would be real handy to have this ability integrated into the library by a professional to ease our testing when a moment is a moment, if it is as simple to do as it appears.Thanks in advance,
dAc
The text was updated successfully, but these errors were encountered: