src/__mocks__/data.js
function joinFlairs(data) {
  let result = []
  for (let [ targetStringArray, ...rest ] of data) {
    // Raw flair containing only one flair don’t need to be modified.
    if (targetStringArray.length < 2) {
      result.push([ targetStringArray, ...rest ])
      continue
    }
    // Concatenate the flairs using one, two and three spaces.
    for (let i = 1; i <= 3; i++) {
      const SPACES = pad('', i)
      result.push([ targetStringArray.join(SPACES), ...rest ])
    }
  }
  return result
}
function joinFlairs(data) {
  let result = []
  for (let [ targetStringArray, ...rest ] of data) {
    // Raw flair containing only one flair don’t need to be modified.
    if (targetStringArray.length < 2) {
      result.push([ targetStringArray, ...rest ])
      continue
    }
    // Concatenate the flairs using one, two and three spaces.
    for (let i = 1; i <= 3; i++) {
      const SPACES = pad('', i)
      result.push([ targetStringArray.join(SPACES), ...rest ])
    }
  }
  return result
}
function joinFlairs ( data ) { let result = [ ] for ( let [ targetStringArray , ... rest ] of data ) { // Raw flair containing only one flair don’t need to be modified. if ( targetStringArray . length < 2 ) { result . push ( [ targetStringArray , ... rest ] ) continue } // Concatenate the flairs using one, two and three spaces. for ( let i = 1 ; i <= 3 ; i ++ ) { const SPACES = pad ( '' , i ) result . push ( [ targetStringArray . join ( SPACES ) , ... rest ] ) } } return result }
Used to join the raw flairs and generate the full data set.
Used to join the raw flairs and generate the full data set .