MCPcopy Create free account
hub / github.com/webpack/webpack / matchAll

Function matchAll

lib/css/CssParser.js:114–125  ·  view source on GitHub ↗
(regexp, str)

Source from the content-addressed store, hash-verified

112 * @returns {RegExpExecArray[]} matches
113 */
114const matchAll = (regexp, str) => {
115 /** @type {RegExpExecArray[]} */
116 const result = [];
117
118 /** @type {null | RegExpExecArray} */
119 let match;
120
121 while ((match = regexp.exec(str)) !== null) {
122 result.push(match);
123 }
124 return result;
125};
126
127/**
128 * Returns normalized url.

Callers 1

walkExportsMethod · 0.85

Calls 2

execMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected