MCPcopy Index your code
hub / github.com/nodejs/node / collectASequenceOfCodePoints

Function collectASequenceOfCodePoints

deps/undici/undici.js:4237–4244  ·  view source on GitHub ↗
(condition, input, position)

Source from the content-addressed store, hash-verified

4235 var assert = require("node:assert");
4236 var { utf8DecodeBytes } = require_encoding();
4237 function collectASequenceOfCodePoints(condition, input, position) {
4238 let result = "";
4239 while (position.position < input.length && condition(input[position.position])) {
4240 result += input[position.position];
4241 position.position++;
4242 }
4243 return result;
4244 }
4245 __name(collectASequenceOfCodePoints, "collectASequenceOfCodePoints");
4246 function collectASequenceOfCodePointsFast(char, input, position) {
4247 const idx = input.indexOf(char, position.position);

Callers 4

parseMIMETypeFunction · 0.70
simpleRangeHeaderValueFunction · 0.70
gettingDecodingSplittingFunction · 0.70

Calls 1

conditionFunction · 0.50

Tested by

no test coverage detected