(typeMapping, chunk)
| 726 | } |
| 727 | |
| 728 | #decodeArray(typeMapping, chunk) { |
| 729 | // RESP 2 null |
| 730 | // https://github.com/redis/redis-specifications/blob/master/protocol/RESP2.md#resp-arrays |
| 731 | if (chunk[this.#cursor] === ASCII['-']) { |
| 732 | this.#cursor += 4; // skip -1\r\n |
| 733 | return null; |
| 734 | } |
| 735 | |
| 736 | return this.#decodeArrayWithLength( |
| 737 | this.#decodeUnsingedNumber(0, chunk), |
| 738 | typeMapping, |
| 739 | chunk |
| 740 | ); |
| 741 | } |
| 742 | |
| 743 | #decodeArrayWithLength(length, typeMapping, chunk) { |
| 744 | return typeof length === 'function' ? |
no test coverage detected