Permalink
Browse files

Move the module export code to the end of the api definition closure.…

… Simply simpler.
  • Loading branch information...
1 parent 2d87473 commit c4a94c6b666f3f51a17d3e9c1826c8cc9d3db0d2 @marcuswestin marcuswestin committed Dec 13, 2011
Showing with 5 additions and 7 deletions.
  1. +5 −7 store.js
View
@@ -19,11 +19,7 @@
* THE SOFTWARE.
*/
-(function(root, store) {
- if (typeof module != 'undefined') { module.exports = store }
- else if (typeof define === 'function' && define.amd) { define(store) }
- else { root.store = store }
-})(this, (function(){
+;(function(){
var api = {},
win = window,
doc = win.document,
@@ -149,5 +145,7 @@
api.disabled = true
}
- return api
-})());
+ if (typeof module != 'undefined') { module.exports = api }
+ else if (typeof define === 'function' && define.amd) { define(api) }
+ else { this.store = api }
+})()

0 comments on commit c4a94c6

Please sign in to comment.