MCPcopy
hub / github.com/webpack/webpack / childrenOf

Method childrenOf

lib/css/CssParser.js:1795–1808  ·  view source on GitHub ↗
(parent)

Source from the content-addressed store, hash-verified

1793 * @returns {AstNode[] | undefined} the child list, or undefined
1794 */
1795 const childrenOf = (parent) => {
1796 if (!parent) return undefined;
1797 switch (A.type(parent)) {
1798 case NodeType.Function:
1799 case NodeType.SimpleBlock:
1800 case NodeType.Declaration:
1801 return A.children(parent);
1802 case NodeType.AtRule:
1803 case NodeType.QualifiedRule:
1804 return A.prelude(parent);
1805 default:
1806 return undefined;
1807 }
1808 };
1809
1810 // `allowImport` mirrors `allowImportAtRule`: true until the first top-level block-bearing rule.
1811 let allowImport = true;

Callers

nothing calls this directly

Calls 1

typeMethod · 0.45

Tested by

no test coverage detected