MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / skipCssString

Function skipCssString

dashboard/build.shared.mjs:338–351  ·  view source on GitHub ↗

Returns the index just past the string literal that begins at `i`.

(css, i)

Source from the content-addressed store, hash-verified

336
337/** Returns the index just past the string literal that begins at `i`. */
338function skipCssString(css, i) {
339 const quote = css[i];
340 let j = i + 1;
341 while (j < css.length) {
342 const ch = css[j];
343 if (ch === "\\") {
344 j += 2;
345 continue;
346 }
347 if (ch === quote) return j + 1;
348 j++;
349 }
350 return j;
351}
352
353/** Returns the index just past the `url(...)` token that begins at `i`. */
354function skipCssUrl(css, i) {

Callers 2

minifyCssFunction · 0.85
skipCssUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected