mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Bump to v4.0.0.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import toObject from './toObject';
|
||||
|
||||
/**
|
||||
* Creates a base function for `_.forIn` or `_.forInRight`.
|
||||
* Creates a base function for methods like `_.forIn`.
|
||||
*
|
||||
* @private
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
@@ -9,13 +7,13 @@ import toObject from './toObject';
|
||||
*/
|
||||
function createBaseFor(fromRight) {
|
||||
return function(object, iteratee, keysFunc) {
|
||||
var iterable = toObject(object),
|
||||
var index = -1,
|
||||
iterable = Object(object),
|
||||
props = keysFunc(object),
|
||||
length = props.length,
|
||||
index = fromRight ? length : -1;
|
||||
length = props.length;
|
||||
|
||||
while ((fromRight ? index-- : ++index < length)) {
|
||||
var key = props[index];
|
||||
while (length--) {
|
||||
var key = props[fromRight ? length : ++index];
|
||||
if (iteratee(iterable[key], key, iterable) === false) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user