MCPcopy Create free account
hub / github.com/webstudio-is/webstudio / splitRepeated

Function splitRepeated

packages/css-data/src/parse-css-value.ts:48–58  ·  view source on GitHub ↗
(nodes: CssNode[])

Source from the content-addressed store, hash-verified

46};
47
48const splitRepeated = (nodes: CssNode[]) => {
49 const lists: Array<CssNode[]> = [[]];
50 for (const node of nodes) {
51 if (node.type === "Operator" && node.value === ",") {
52 lists.push([]);
53 } else {
54 lists.at(-1)?.push(node);
55 }
56 }
57 return lists;
58};
59
60const cssNumericFunctionNames = new Set([
61 "calc",

Callers 1

parseCssValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected