mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Avoid enforcing strict mode in _.defaults, _.extend, and _.bindAll and add benchmarks for _.bindAll and _.functions. [closes #45]
Former-commit-id: 1bb0b5155d3ae46052b4a06cb538dff307e8ec5e
This commit is contained in:
12
build.js
12
build.js
@@ -223,13 +223,13 @@
|
||||
'inLoop',
|
||||
'init',
|
||||
'isKeysFast',
|
||||
'iteratee',
|
||||
'object',
|
||||
'objectBranch',
|
||||
'noCharByIndex',
|
||||
'shadowed',
|
||||
'top',
|
||||
'useHas'
|
||||
'useHas',
|
||||
'useStrict'
|
||||
];
|
||||
|
||||
/** Collections of method names */
|
||||
@@ -840,13 +840,7 @@
|
||||
// prepend data object references to property names to avoid having to
|
||||
// use a with-statement
|
||||
iteratorOptions.forEach(function(property) {
|
||||
if (property == 'iteratee') {
|
||||
// use a more fine-grained regexp for the `iteratee` property because
|
||||
// it's a compiled variable as well as a data property
|
||||
snippet = snippet.replace(/(__t *= *\( *)(iteratee)/, '$1obj.$2');
|
||||
} else {
|
||||
snippet = snippet.replace(RegExp('([^\\w.])\\b' + property + '\\b', 'g'), '$1obj.' + property);
|
||||
}
|
||||
snippet = snippet.replace(RegExp('([^\\w.])\\b' + property + '\\b', 'g'), '$1obj.' + property);
|
||||
});
|
||||
|
||||
// remove unnecessary code
|
||||
|
||||
Reference in New Issue
Block a user