code: function mergeOptions(...opt){
          // extract default (last argument)
          const result = opt.pop();
  
          // try to find first match
          while (opt.length > 0){
              // extract first argument (priority)
              const o = opt.shift();
  
              // value set ?
              if (typeof o !== 'undefined' && o !== null){
                  return o;
              }
          }
  
          return result;
      }
docs: utility function to merge different options cli args take presendence over config