mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Apply destructuring transform.
This commit is contained in:
@@ -17,7 +17,7 @@ function baseWrapperValue(value, actions) {
|
|||||||
if (result instanceof LazyWrapper) {
|
if (result instanceof LazyWrapper) {
|
||||||
result = result.value();
|
result = result.value();
|
||||||
}
|
}
|
||||||
return arrayReduce(actions, (result, action) => action.func.apply(action.thisArg, arrayPush([result], action.args)), result);
|
return arrayReduce(actions, (result, { func, thisArg, args }) => func.apply(thisArg, arrayPush([result], args)), result);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default baseWrapperValue;
|
export default baseWrapperValue;
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import isKeyable from './_isKeyable.js';
|
|||||||
* @param {string} key The reference key.
|
* @param {string} key The reference key.
|
||||||
* @returns {*} Returns the map data.
|
* @returns {*} Returns the map data.
|
||||||
*/
|
*/
|
||||||
function getMapData(map, key) {
|
function getMapData({ __data__ }, key) {
|
||||||
var data = map.__data__;
|
var data = __data__;
|
||||||
return isKeyable(key)
|
return isKeyable(key)
|
||||||
? data[typeof key == 'string' ? 'string' : 'hash']
|
? data[typeof key == 'string' ? 'string' : 'hash']
|
||||||
: data.map;
|
: data.map;
|
||||||
|
|||||||
Reference in New Issue
Block a user