src/utils/helpers.js
function flattenInternal(output, element) {
  if (element) {
    element.forEach((obj) => {
      if (Array.isArray(obj)) {
        flattenInternal(output, obj);
      } else {
        output.push(obj);
      }
    });
  }
}
function flattenInternal(output, element) {
  if (element) {
    element.forEach((obj) => {
      if (Array.isArray(obj)) {
        flattenInternal(output, obj);
      } else {
        output.push(obj);
      }
    });
  }
}
function flattenInternal ( output , element ) { if ( element ) { element . forEach ( ( obj ) => { if ( Array . isArray ( obj ) ) { flattenInternal ( output , obj ) ; } else { output . push ( obj ) ; } } ) ; } }
Recursive function for flattening an iterable.

@param {object} output - base object to be updated
@param {object} element - input object to be merged into the output
Recursive function for flattening an iterable .