title: Different logic if both or only one key present in object?
body: <p>I have this kind of schema:</p>
  
  <pre><code>const schema = {
    actions: {
      ident: {
        action: (v) =&gt; v,
        path: 'some.path.key',
      },
      mul: {
        action: (v) =&gt; v * 2,
        path: 'some.other.path.key',
      },
    },
  };
  </code></pre>
  
  <p>And a helper function, that takes object with keys present in schema actions, e.g:</p>
  
  <pre><code>const obj = {
    ident: 1,
    mul: 2,
  }
  
  const res = helper(schema, obj);
  
  /* res */
  {
    some: {
      path: {
        key: 1,
      },
      other: {
        path: {
          key: 4,
        }
      }
    },
  }
  </code></pre>
  
  <p>And construct a new object with a function applied to the value.</p>
  
  <p>Sometimes i need a behavior when both keys present in source object, e.g:</p>
  
  <pre><code>const schema2 = {
    actions: {
      ident: {
        action: (v) =&gt; v,
        path: 'some.path.key',
      },
      mul: {
        action: (v) =&gt; v * 2,
        path: 'some.other.path.key',
      },
      'mul:ident': {
        action: (v1, v2) =&gt; v1/v2,
        path: 'key',
      }
    },
  };
  </code></pre>
  
  <p>In case like this, i need the result object to be:</p>
  
  <pre><code>const obj = {
    ident: 1,
    mul: 2,
  }
  
  const res = helper(schema, obj);
  
  /* res */
  {
    key: 2  // 2/1 == 2
  }
  </code></pre>
  
  <p>How can i implement such conditional logic in a good way?</p>