Alt.js
function generateActions({ generate, ...actions }) {
  return !generate
    ? actions
    : Object.assign(
        generate.reduce((obj, name) => {
          obj[name] = forwardValue;
          return obj;
        }, {}),
        actions
      );
}
function generateActions({ generate, ...actions }) {
  return !generate
    ? actions
    : Object.assign(
        generate.reduce((obj, name) => {
          obj[name] = forwardValue;
          return obj;
        }, {}),
        actions
      );
}
function generateActions ( { generate , ... actions } ) { return ! generate ? actions : Object . assign ( generate . reduce ( ( obj , name ) => { obj [ name ] = forwardValue ; return obj ; } , { } ) , actions ) ; }
process the "generate" field of an Actions object. Adds a new pass-through
method with each name from the generated values
process the generate field of an Actions object . Adds a new pass - through method with each name from the generated values