lib/client/utils/filterSectionExamples.js
/**
 * Return a copy of the given section with the examples array filtered
 * to contain only the specified index
 *
 * @param {object} section
 * @param {number} index
 * @returns {object}
 */
Return a copy of the given section with the examples array filtered
to contain only the specified index

@param {object} section
@param {number} index
@returns {object}
Return a copy of the given section with the examples array filtered to contain only the specified index @param { object } section @param { number } index @returns { object }
function filterSectionExamples(section, index) {
  if (index === void 0) {
    index = -1;
  }
  var content = Array.isArray(section.content) ? [section.content[index]] : [];
  return Object.assign({}, section, {
    content: content
  });
}
function filterSectionExamples ( section , index ) { if ( index === void 0 ) { index = - 1 ; } var content = Array . isArray ( section . content ) ? [ section . content [ index ] ] : [ ] ; return Object . assign ( { } , section , { content : content } ) ; }
Return a copy of the given section with the examples array filtered
 to contain only the specified index
Return a copy of the given section with the examples array filtered to contain only the specified index