Fix method depreciated in Moment.js still used in Kalendae #26

Merged
merged 1 commit into from Apr 4, 2012

Projects

None yet

3 participants

Contributor
cvergne commented Apr 3, 2012

No description provided.

@ChiperSoft ChiperSoft merged commit b58d29d into ChiperSoft:master Apr 4, 2012

All of these moment.prototype[value] assignments are probably unnecessary.

Moment doesn't expose the internal prototype through moment.prototype but through moment.fn similar to how jQuery does. And because moment is a function, you're just copying undefined objects from Function.prototype to Function.prototype.

I saw in an earlier commit that this was for Closure Compiler, but maybe using moment.fn['clone'] = moment.fn.clone would be better here. Or, maybe you don't need it after all?

Owner

All of exports.js is a left over file from when I was attempting to use the advanced compiling function in closure compiler, which requires explicitly defining all of your prototypes using string names. In the end it proved to be more of a hassle than I was willing to put forward. I left the file in the source tree in case I ever revisited the attempt, but it's not included in the build process.

Ok, cool, I figured it was something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment