docs: function buildPatterns(collectionObj, options) {
    const patterns = {};
    for (const childKey in collectionObj) {
      if (isPattern(collectionObj[childKey])) {
        patterns[childKey] = buildPattern(collectionObj[childKey], options);
        delete collectionObj[childKey];
      }
    }
    return patterns;
  }