mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Cleanup fix for modularize underscore and _.mixin and add tests for correct indicatorObject use in underscore builds.
Former-commit-id: 7700fb4df90cdc3eca47af037677d71a70908616
This commit is contained in:
14
dist/lodash.underscore.js
vendored
14
dist/lodash.underscore.js
vendored
@@ -1896,7 +1896,7 @@
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, callback);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1916,7 +1916,7 @@
|
||||
* _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(',');
|
||||
* // => logs each number from right to left and returns '3,2,1'
|
||||
*/
|
||||
function forEachRight(collection, callback, thisArg) {
|
||||
function forEachRight(collection, callback) {
|
||||
var iterable = collection,
|
||||
length = collection ? collection.length : 0;
|
||||
|
||||
@@ -1924,12 +1924,10 @@
|
||||
var props = keys(collection);
|
||||
length = props.length;
|
||||
}
|
||||
callback = baseCreateCallback(callback, thisArg, 3);
|
||||
forEach(collection, function(value, index, collection) {
|
||||
index = props ? props[--length] : --length;
|
||||
callback(iterable[index], index, collection);
|
||||
return callback(iterable[index], index, collection) === false && indicatorObject;
|
||||
});
|
||||
return collection;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4145,7 +4143,9 @@
|
||||
* ');
|
||||
*/
|
||||
function template(text, data, options) {
|
||||
var settings = lodash.templateSettings;
|
||||
var _ = lodash,
|
||||
settings = _.templateSettings;
|
||||
|
||||
text || (text = '');
|
||||
options = defaults({}, options, settings);
|
||||
|
||||
@@ -4186,7 +4186,7 @@
|
||||
'return __p\n}';
|
||||
|
||||
try {
|
||||
var result = Function('_', 'return ' + source)(lodash);
|
||||
var result = Function('_', 'return ' + source)(_);
|
||||
} catch(e) {
|
||||
e.source = source;
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user