(input)
| 4644 | return char.codePointAt(0); |
| 4645 | } |
| 4646 | function parseUrlencoded(input) { |
| 4647 | const sequences = strictlySplitByteSequence(input, p4("&")); |
| 4648 | const output = []; |
| 4649 | for (const bytes of sequences) { |
| 4650 | if (bytes.length === 0) { |
| 4651 | continue; |
| 4652 | } |
| 4653 | let name, value; |
| 4654 | const indexOfEqual = bytes.indexOf(p4("=")); |
| 4655 | if (indexOfEqual >= 0) { |
| 4656 | name = bytes.slice(0, indexOfEqual); |
| 4657 | value = bytes.slice(indexOfEqual + 1); |
| 4658 | } else { |
| 4659 | name = bytes; |
| 4660 | value = new Uint8Array(0); |
| 4661 | } |
| 4662 | name = replaceByteInByteSequence(name, 43, 32); |
| 4663 | value = replaceByteInByteSequence(value, 43, 32); |
| 4664 | const nameString = utf8DecodeWithoutBOM(percentDecodeBytes(name)); |
| 4665 | const valueString = utf8DecodeWithoutBOM(percentDecodeBytes(value)); |
| 4666 | output.push([nameString, valueString]); |
| 4667 | } |
| 4668 | return output; |
| 4669 | } |
| 4670 | function parseUrlencodedString(input) { |
| 4671 | return parseUrlencoded(utf8Encode(input)); |
| 4672 | } |
no test coverage detected
searching dependent graphs…