diff --git a/build.js b/build.js index 9f7d1162d..a0fb80ea3 100755 --- a/build.js +++ b/build.js @@ -2495,9 +2495,10 @@ .replace(/function print[^}]+}/, '') .replace(/'(?:\\n|\s)+'/g, "''") .replace(/__p *\+= *' *';/g, '') + .replace(/\s*\+\s*'';/g, ';') .replace(/(__p *\+= *)' *' *\+/g, '$1') - .replace(/({) *;|; *(})/g, '$1$2') - .replace(/\(\(__t *= *\( *([^)]+) *\)\) *== *null *\? *'' *: *__t\)/g, '($1)'); + .replace(/(?:; *)([{}])|([{}])(?: *;)/g, '$1$2') + .replace(/\(\(__t *= *\( *([^)]+?) *\)\) *== *null *\? *'' *: *__t\)/g, '($1)'); // remove the with-statement snippet = snippet.replace(/ *with *\(.+?\) *{/, '\n').replace(/}([^}]*}[^}]*$)/, '$1'); diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index 412ce9015..75b1977e3 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -455,41 +455,40 @@ var iteratorTemplate = function(obj) { var __p = 'var index, iterable = ' + - (obj.firstArg ) + + (obj.firstArg) + ', result = iterable;\nif (!iterable) return result;\n' + - (obj.top ) + + (obj.top) + ';\n'; if (obj.arrays) { __p += 'var length = iterable.length; index = -1;\nif (' + - (obj.arrays ) + + (obj.arrays) + ') { '; if (support.unindexedChars) { __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; - } ; + } __p += '\n while (++index < length) {\n ' + - (obj.loop ) + + (obj.loop) + '\n }\n}\nelse { '; } else if (support.nonEnumArgs) { __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + - (obj.loop ) + + (obj.loop) + '\n }\n } else { '; - } ; + } if (support.enumPrototypes) { __p += '\n var skipProto = typeof iterable == \'function\';\n '; - } ; + } if (support.fastKeys && obj.useHas) { __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] ? nativeKeys(iterable) : [],\n length = ownProps.length;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n '; if (support.enumPrototypes) { __p += 'if (!(skipProto && index == \'prototype\')) {\n '; - } ; + } __p += - (obj.loop ) + - ''; + (obj.loop); if (support.enumPrototypes) { __p += '}\n'; - } ; + } __p += ' } '; } else { __p += '\n for (index in iterable) {'; @@ -501,39 +500,39 @@ __p += ' && '; } if (obj.useHas) { __p += 'hasOwnProperty.call(iterable, index)'; - } ; + } __p += ') { '; - } ; + } __p += - (obj.loop ) + + (obj.loop) + '; '; if (support.enumPrototypes || obj.useHas) { __p += '\n }'; - } ; + } __p += '\n } '; - } ; + } if (support.nonEnumShadows) { __p += '\n\n var ctor = iterable.constructor;\n '; for (var k = 0; k < 7; k++) { __p += '\n index = \'' + - (obj.shadowedProps[k] ) + + (obj.shadowedProps[k]) + '\';\n if ('; if (obj.shadowedProps[k] == 'constructor') { __p += '!(ctor && ctor.prototype === iterable) && '; - } ; + } __p += 'hasOwnProperty.call(iterable, index)) {\n ' + - (obj.loop ) + + (obj.loop) + '\n } '; - } ; + } - } ; + } if (obj.arrays || support.nonEnumArgs) { __p += '\n}'; - } ; + } __p += - (obj.bottom ) + + (obj.bottom) + ';\nreturn result'; return __p diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index 1d75fac93..71a195504 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -5,7 +5,7 @@ * Underscore.js 1.4.4 underscorejs.org/LICENSE */ ;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&Vt.call(n,"__wrapped__")?n:new L(n)}function B(n,t,e){t||(t=0);var r=n.length,u=r-t>=(e||f);if(u){var a={};for(e=t-1;++et||typeof n=="undefined")return 1;if(nu;u++)r+="i='"+t.f[u]+"';if(","constructor"==t.f[u]&&(r+="!(f&&f.prototype===m)&&"),r+="h.call(m,i)){"+t.e+"}"}return(t.b||ce.nonEnumArgs)&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Vt,G,ve,et,a,P,ne)}function D(n){return"\\"+N[n]}function z(n){return ye[n]}function K(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function L(n){this.__wrapped__=n}function M(){}function U(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1; e=e-t||0;for(var u=Et(0>e?0:e);++r