CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
_baseWrapperValue.js26 linesDownload Raw Back to lodash
1var LazyWrapper = require('./_LazyWrapper'),2    arrayPush = require('./_arrayPush'),3    arrayReduce = require('./_arrayReduce');4 5/**6 * The base implementation of `wrapperValue` which returns the result of7 * performing a sequence of actions on the unwrapped `value`, where each8 * successive action is supplied the return value of the previous.9 *10 * @private11 * @param {*} value The unwrapped value.12 * @param {Array} actions Actions to perform to resolve the unwrapped value.13 * @returns {*} Returns the resolved value.14 */15function baseWrapperValue(value, actions) {16  var result = value;17  if (result instanceof LazyWrapper) {18    result = result.value();19  }20  return arrayReduce(actions, function(result, action) {21    return action.func.apply(action.thisArg, arrayPush([result], action.args));22  }, result);23}24 25module.exports = baseWrapperValue;26 
basant307/AI_Governance_Project · CoolFace