mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Ensure snippet in iteratorTemplate is minifiable and remove unneeded references from iteratorTemplate.
Former-commit-id: f8c96f63f1a50644c0d2074e5419e68d1a247d46
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
'nonEnum',
|
||||
'nonEnumProps',
|
||||
'object',
|
||||
'objectClass',
|
||||
'objectProto',
|
||||
'objectTypes',
|
||||
'ownIndex',
|
||||
|
||||
12
lodash.js
12
lodash.js
@@ -568,8 +568,8 @@
|
||||
// define conditions used in the loop
|
||||
' <%' +
|
||||
' var conditions = [];' +
|
||||
' if (support.enumPrototypes) { conditions.push("!(skipProto && index == \'prototype\')"); }' +
|
||||
' if (support.enumErrorProps) { conditions.push("!(skipErrorProps && (index == \'message\' || index == \'name\'))"); }' +
|
||||
' if (support.enumPrototypes) { conditions.push(\'!(skipProto && index == "prototype")\'); }' +
|
||||
' if (support.enumErrorProps) { conditions.push(\'!(skipErrorProps && (index == "message" || index == "name"))\'); }' +
|
||||
' %>' +
|
||||
|
||||
// iterate own properties using `Object.keys`
|
||||
@@ -826,15 +826,15 @@
|
||||
// create the function factory
|
||||
var factory = Function(
|
||||
'ctorByClass, errorClass, errorProto, hasOwnProperty, isArguments, ' +
|
||||
'isArray, isString, keys, lodash, objectClass, objectProto, objectTypes, ' +
|
||||
'nonEnumProps, stringClass, stringProto, toString',
|
||||
'isArray, isString, keys, lodash, objectProto, objectTypes, nonEnumProps, ' +
|
||||
'stringClass, stringProto, toString',
|
||||
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
|
||||
);
|
||||
// return the compiled function
|
||||
return factory(
|
||||
ctorByClass, errorClass, errorProto, hasOwnProperty, isArguments,
|
||||
isArray, isString, keys, lodash, objectClass, objectProto, objectTypes,
|
||||
nonEnumProps, stringClass, stringProto, toString
|
||||
isArray, isString, keys, lodash, objectProto, objectTypes, nonEnumProps,
|
||||
stringClass, stringProto, toString
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user