docs: function buildCollections(patternObj, options, collectionPromises = []) {
    if (isPattern(patternObj)) {
      return collectionPromises;
    }
    if (isCollection(patternObj)) {
      collectionPromises.push(buildCollection(patternObj, options));
    }
    for (const patternKey in patternObj) {
      if (patternKey !== 'collection') {
        buildCollections(patternObj[patternKey], options, collectionPromises);
      }
    }
    return collectionPromises;
  }