function uniqueAllPatterns(allPatterns, patternlab) {
    return _.uniq(
      _.flatMapDeep(
        _.map(allPatterns, (patterns) => [
          injectDocumentationBlock(
            _.find(patterns, (p) => !p.patternPartial.startsWith('viewall-')),
            patternlab,
            false
          ),
          ...patterns,
        ]),
        (pattern) => pattern
      )
    );
  }
/**
   * Uniques all generated patterns and groups, also adds a group document pattern before
   * each group. Used for generating view all page and all its pattern.
   *
   * @param {[Pattern[]]} allPatterns All generated patterns
   * @param {Patternlab} patternlab Actual patternlab instance
   */
Uniques all generated patterns and groups, also adds a group document pattern before
each group. Used for generating view all page and all its pattern.

@param {[Pattern[]]} allPatterns All generated patterns
@param {Patternlab} patternlab Actual patternlab instance
Uniques all generated patterns and groups also adds a group document pattern before each group . Used for generating view all page and all its pattern . @param { [ Pattern [] ] } allPatterns All generated patterns @param { Patternlab } patternlab Actual patternlab instance
function uniqueAllPatterns(allPatterns, patternlab) {
    return _.uniq(
      _.flatMapDeep(
        _.map(allPatterns, (patterns) => [
          injectDocumentationBlock(
            _.find(patterns, (p) => !p.patternPartial.startsWith('viewall-')),
            patternlab,
            false
          ),
          ...patterns,
        ]),
        (pattern) => pattern
      )
    );
  }
function uniqueAllPatterns ( allPatterns , patternlab ) { return _ . uniq ( _ . flatMapDeep ( _ . map ( allPatterns , ( patterns ) => [ injectDocumentationBlock ( _ . find ( patterns , ( p ) => ! p . patternPartial . startsWith ( 'viewall-' ) ) , patternlab , false ) , ... patterns , ] ) , ( pattern ) => pattern ) ) ; }
Uniques all generated patterns and groups, also adds a group document pattern before
 each group.
Uniques all generated patterns and groups also adds a group document pattern before each group .