Skip to content

Instantly share code, notes, and snippets.

@vierbergenlars
Last active December 12, 2015 03:28
Show Gist options
  • Save vierbergenlars/4707430 to your computer and use it in GitHub Desktop.
Save vierbergenlars/4707430 to your computer and use it in GitHub Desktop.
UglifyJS bug report attachment
uglifyjs original.js -c -b --comments all -o commented.js
uglifyjs original.js -c -m -o min.js
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);
};
};
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)}};
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