src/parse/patterns.js
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;
}
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;
}
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 ; }
Flesh out all of the patterns that are within `collectionObj`. This is
before any of these patterns get assigned to `items` or `patterns` on
`collectionObj.collection`.

@param {Object} collectionObj  The containing object with pattern children
that will ultimately be managed under
collectionObj.collection (items and patterns)
@param {Object} options
@return {Object} patterns      Built-out pattern objects
Flesh out all of the patterns that are within collectionObj . This is before any of these patterns get assigned to items or patterns on collectionObj . collection .