Last active
December 12, 2015 03:28
-
-
Save vierbergenlars/4707430 to your computer and use it in GitHub Desktop.
UglifyJS bug report attachment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uglifyjs original.js -c -b --comments all -o commented.js | |
uglifyjs original.js -c -m -o min.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var func = function() { | |
this.exec = function(req) { | |
// Check method matches | |
if (util.type.require(req, T.application.request), opts.methods && !util.obj.array.contains(opts.methods, req.method)) return /** | |
* Fired when the route does not match | |
* | |
* @event mismatch | |
*/ | |
this.emit("mismatch"), this; | |
// Check url matches | |
var match = opts.url.match(req.url); | |
return match ? this : (this.emit("mismatch"), this); | |
}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var func=function(){this.exec=function(t){if(util.type.require(t,T.application.request),opts.methods&&!util.obj.array.contains(opts.methods,t.method))return this.emit("mismatch"),this;var i=opts.url.match(t.url);return i?this:(this.emit("mismatch"),this)}}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var func = (function(route) { | |
this.exec = function(req) { | |
util.type.require(req, T.application.request) | |
// Check method matches | |
if(opts.methods&&!util.obj.array.contains(opts.methods, req.method)) { | |
/** | |
* Fired when the route does not match | |
* | |
* @event mismatch | |
*/ | |
this.emit('mismatch') | |
return this | |
} | |
// Check url matches | |
var match = opts.url.match(req.url) | |
if(!match) { | |
this.emit('mismatch') | |
return this | |
} | |
return this | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment