UNPKG

switch-functional

Version:
29 lines (13 loc) 266 B
export const applyReturnValues=( input, returnValues, { mapReturnValues })=> { const returnValue= mapReturnValues===undefined? returnValues[0]: mapReturnValues(...returnValues); return typeof returnValue==="function"?returnValue(input):returnValue };