Files
NapCatQQ/.pnpm-store/v3/files/66/ae77ddcbd01f482aa85d25966cc19a680f7bf8245cd28e8e2dd8448d7cca65c4921fdc55eb85b1fd6764d741e6c55620f7f1f0537e8098be588ecb53ef4ba7
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

26 lines
855 B
Plaintext

import LazyWrapper from './_LazyWrapper.js';
import arrayPush from './_arrayPush.js';
import arrayReduce from './_arrayReduce.js';
/**
* The base implementation of `wrapperValue` which returns the result of
* performing a sequence of actions on the unwrapped `value`, where each
* successive action is supplied the return value of the previous.
*
* @private
* @param {*} value The unwrapped value.
* @param {Array} actions Actions to perform to resolve the unwrapped value.
* @returns {*} Returns the resolved value.
*/
function baseWrapperValue(value, actions) {
var result = value;
if (result instanceof LazyWrapper) {
result = result.value();
}
return arrayReduce(actions, function(result, action) {
return action.func.apply(action.thisArg, arrayPush([result], action.args));
}, result);
}
export default baseWrapperValue;