Skip to content

Commit

Permalink
Move the module export code to the end of the api definition closure.…
Browse files Browse the repository at this point in the history
… Simply simpler.
  • Loading branch information
marcuswestin committed Dec 13, 2011
1 parent 2d87473 commit c4a94c6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.