mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 03:47: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',
|
'nonEnum',
|
||||||
'nonEnumProps',
|
'nonEnumProps',
|
||||||
'object',
|
'object',
|
||||||
'objectClass',
|
|
||||||
'objectProto',
|
'objectProto',
|
||||||
'objectTypes',
|
'objectTypes',
|
||||||
'ownIndex',
|
'ownIndex',
|
||||||
|
|||||||
12
lodash.js
12
lodash.js
@@ -568,8 +568,8 @@
|
|||||||
// define conditions used in the loop
|
// define conditions used in the loop
|
||||||
' <%' +
|
' <%' +
|
||||||
' var conditions = [];' +
|
' var conditions = [];' +
|
||||||
' if (support.enumPrototypes) { conditions.push("!(skipProto && index == \'prototype\')"); }' +
|
' if (support.enumPrototypes) { conditions.push(\'!(skipProto && index == "prototype")\'); }' +
|
||||||
' if (support.enumErrorProps) { conditions.push("!(skipErrorProps && (index == \'message\' || index == \'name\'))"); }' +
|
' if (support.enumErrorProps) { conditions.push(\'!(skipErrorProps && (index == "message" || index == "name"))\'); }' +
|
||||||
' %>' +
|
' %>' +
|
||||||
|
|
||||||
// iterate own properties using `Object.keys`
|
// iterate own properties using `Object.keys`
|
||||||
@@ -826,15 +826,15 @@
|
|||||||
// create the function factory
|
// create the function factory
|
||||||
var factory = Function(
|
var factory = Function(
|
||||||
'ctorByClass, errorClass, errorProto, hasOwnProperty, isArguments, ' +
|
'ctorByClass, errorClass, errorProto, hasOwnProperty, isArguments, ' +
|
||||||
'isArray, isString, keys, lodash, objectClass, objectProto, objectTypes, ' +
|
'isArray, isString, keys, lodash, objectProto, objectTypes, nonEnumProps, ' +
|
||||||
'nonEnumProps, stringClass, stringProto, toString',
|
'stringClass, stringProto, toString',
|
||||||
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
|
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
|
||||||
);
|
);
|
||||||
// return the compiled function
|
// return the compiled function
|
||||||
return factory(
|
return factory(
|
||||||
ctorByClass, errorClass, errorProto, hasOwnProperty, isArguments,
|
ctorByClass, errorClass, errorProto, hasOwnProperty, isArguments,
|
||||||
isArray, isString, keys, lodash, objectClass, objectProto, objectTypes,
|
isArray, isString, keys, lodash, objectProto, objectTypes, nonEnumProps,
|
||||||
nonEnumProps, stringClass, stringProto, toString
|
stringClass, stringProto, toString
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user