MCPcopy
hub / github.com/Splidejs/splide / before

Function before

src/js/utils/dom/before/before.ts:10–18  ·  view source on GitHub ↗
( nodes: Node | Node[], ref: Node | null )

Source from the content-addressed store, hash-verified

8 * @param ref - A reference node.
9 */
10export function before( nodes: Node | Node[], ref: Node | null ): void {
11 forEach( nodes, node => {
12 const parent = ( ref || node ).parentNode;
13
14 if ( parent ) {
15 parent.insertBefore( node, ref );
16 }
17 } );
18}

Callers 4

createArrowsFunction · 0.90
addFunction · 0.90
generateFunction · 0.90
before.test.tsFile · 0.90

Calls 1

forEachFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…