code: function ReactShallowQuery(objects, query) {
      if (typeof query !== "string")
          throw new Error("You must provide a query.");
  
      if (!Array.isArray(objects))
          objects = [objects];
      
      const fragments = query.split(" ");
      let recursive = true;
  
      // Loop through each fragments.
      return fragments.reduce((results, fragment, index) => {
          if (fragment == ">") {
              recursive = false;
              
              return results;
          }
  
          // Parse the fragment to figure out what matcher to use.
          // The matcher is used on each component to figure out if meets the query criteria.
          const matcher = getMatcher(fragment);
  
          // Alter the accumulative results array based on the current fragment.
          // This may add new elements or remove existing elements within the array.
          return results.reduce((elements, element) => {
              let objects = (index ? element.props.children : element);
  
              if (!Array.isArray(objects))
                  objects = [objects];
              
              // Append the newly found elements.
              return elements.concat(findResults(objects, matcher, fragment, recursive));
          }, []);
      }, objects);
  }
docs: TODO: Use better variables names.