lib/parser.js
function parseArrayElements (parser, responses, i) {
  const bufferLength = parser.buffer.length
  while (i < responses.length) {
    const offset = parser.offset
    if (parser.offset >= bufferLength) {
      pushArrayCache(parser, responses, i)
      return
    }
    const response = parseType(parser, parser.buffer[parser.offset++])
    if (response === undefined) {
      if (!(parser.arrayCache.length || parser.bufferCache.length)) {
        parser.offset = offset
      }
      pushArrayCache(parser, responses, i)
      return
    }
    responses[i] = response
    i++
  }

  return responses
}
function parseArrayElements (parser, responses, i) {
  const bufferLength = parser.buffer.length
  while (i < responses.length) {
    const offset = parser.offset
    if (parser.offset >= bufferLength) {
      pushArrayCache(parser, responses, i)
      return
    }
    const response = parseType(parser, parser.buffer[parser.offset++])
    if (response === undefined) {
      if (!(parser.arrayCache.length || parser.bufferCache.length)) {
        parser.offset = offset
      }
      pushArrayCache(parser, responses, i)
      return
    }
    responses[i] = response
    i++
  }

  return responses
}
function parseArrayElements ( parser , responses , i ) { const bufferLength = parser . buffer . length while ( i < responses . length ) { const offset = parser . offset if ( parser . offset >= bufferLength ) { pushArrayCache ( parser , responses , i ) return } const response = parseType ( parser , parser . buffer [ parser . offset ++ ] ) if ( response === undefined ) { if ( ! ( parser . arrayCache . length || parser . bufferCache . length ) ) { parser . offset = offset } pushArrayCache ( parser , responses , i ) return } responses [ i ] = response i ++ } return responses }
Parse redis array response elements
@param {JavascriptRedisParser} parser
@param {Array} responses
@param {number} i
@returns {undefined|null|any[]}
Parse redis array response elements