mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Fix argument juggling.
This commit is contained in:
@@ -9,9 +9,12 @@ var uglifyOptions = require('./uglify.options.js');
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
function minify(inpath, outpath, callback, options) {
|
||||
if (typeof outpath == 'function') {
|
||||
if (_.isFunction(outpath)) {
|
||||
if (_.isObject(callback)) {
|
||||
options = callback;
|
||||
}
|
||||
callback = outpath;
|
||||
outpath = undefined;
|
||||
callback = options;
|
||||
}
|
||||
if (!outpath) {
|
||||
outpath = inpath.replace(/(?=\.js$)/, '.min');
|
||||
|
||||
Reference in New Issue
Block a user