Skip to content

Commit

Permalink
Revisited boilerplate strategy
Browse files Browse the repository at this point in the history
Using this strategy saves 13 bytes from the minified and gzipped output
because the argument name can be reduced to a single character but the
array and string cannot.
  • Loading branch information
kriskowal committed Apr 29, 2012
1 parent 27b0931 commit dd491af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions q.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@

// RequireJS
if (typeof define === "function") {
define(["exports"], definition);
define(definition);
// CommonJS
} else if (typeof exports === "object") {
definition(exports);
definition(void 0, exports);
// <script>
} else {
definition(Q = {});
definition(void 0, Q = {});
}

})(function (exports) {
})(function (require, exports) {
"use strict";

var nextTick;
Expand Down

0 comments on commit dd491af

Please sign in to comment.