mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 20:37:48 +00:00
Bump to v3.0.1.
This commit is contained in:
committed by
John-David Dalton
parent
bb53dde973
commit
60b8329a73
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
@@ -10,6 +10,22 @@ var baseForRight = require('lodash._baseforright'),
|
||||
bindCallback = require('lodash._bindcallback'),
|
||||
keysIn = require('lodash.keysin');
|
||||
|
||||
/**
|
||||
* Creates a function for `_.forIn` or `_.forInRight`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} objectFunc The function to iterate over an object.
|
||||
* @returns {Function} Returns the new each function.
|
||||
*/
|
||||
function createForIn(objectFunc) {
|
||||
return function(object, iteratee, thisArg) {
|
||||
if (typeof iteratee != 'function' || typeof thisArg != 'undefined') {
|
||||
iteratee = bindCallback(iteratee, thisArg, 3);
|
||||
}
|
||||
return objectFunc(object, iteratee, keysIn);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.forIn` except that it iterates over properties of
|
||||
* `object` in the opposite order.
|
||||
@@ -35,9 +51,6 @@ var baseForRight = require('lodash._baseforright'),
|
||||
* });
|
||||
* // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c'
|
||||
*/
|
||||
function forInRight(object, iteratee, thisArg) {
|
||||
iteratee = bindCallback(iteratee, thisArg, 3);
|
||||
return baseForRight(object, iteratee, keysIn);
|
||||
}
|
||||
var forInRight = createForIn(baseForRight);
|
||||
|
||||
module.exports = forInRight;
|
||||
|
||||
Reference in New Issue
Block a user