MCPcopy
hub / github.com/webpack/webpack / collectCharacters

Function collectCharacters

lib/html/syntax.js:7426–7437  ·  view source on GitHub ↗

* @param {RegExp} regExp reg exp to collect characters * @returns {string | undefined} characters

(regExp)

Source from the content-addressed store, hash-verified

7424 * @returns {string | undefined} characters
7425 */
7426 function collectCharacters(regExp) {
7427 /** @type {string} */
7428 let chars;
7429 const match = regExp.exec(input.slice(Math.max(0, position)));
7430
7431 if (match) {
7432 [chars] = match;
7433 position += chars.length;
7434
7435 return chars;
7436 }
7437 }
7438
7439 /**
7440 * @returns {void}

Callers 2

tokenizeFunction · 0.85
parseSrcsetFunction · 0.85

Calls 2

execMethod · 0.80
sliceMethod · 0.80

Tested by

no test coverage detected