Permalink
Browse files

Export for CommonJS. Node.js etc.

  • Loading branch information...
1 parent 88b8c9e commit fa9b0e7a812c0dbe557e70e2c7a2a9c3b68c01f4 @epeli epeli committed Oct 24, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/xdate.js
View
@@ -765,7 +765,10 @@ function zeroPad(n, len) {
return n;
}
-
+// Export for CommonJS. Node.js etc.
+if (typeof module !== 'undefined' && module.exports) {
+ module.exports = XDate;
+}
return XDate;
-})(Date, Math, Array);
+})(Date, Math, Array);

0 comments on commit fa9b0e7

Please sign in to comment.