lib/parser.js
function parseLength (parser) {
  const length = parser.buffer.length - 1
  var offset = parser.offset
  var number = 0

  while (offset < length) {
    const c1 = parser.buffer[offset++]
    if (c1 === 13) {
      parser.offset = offset + 1
      return number
    }
    number = (number * 10) + (c1 - 48)
  }
}
function parseLength (parser) {
  const length = parser.buffer.length - 1
  var offset = parser.offset
  var number = 0

  while (offset < length) {
    const c1 = parser.buffer[offset++]
    if (c1 === 13) {
      parser.offset = offset + 1
      return number
    }
    number = (number * 10) + (c1 - 48)
  }
}
function parseLength ( parser ) { const length = parser . buffer . length - 1 var offset = parser . offset var number = 0 while ( offset < length ) { const c1 = parser . buffer [ offset ++ ] if ( c1 === 13 ) { parser . offset = offset + 1 return number } number = ( number * 10 ) + ( c1 - 48 ) } }
Returns the read length
@param {JavascriptRedisParser} parser
@returns {undefined|number}
Returns the read length