An anticore contract to insert some
elements before
/after
/prepend
/append
/replace
another one.
npm i @anticore-contracts/tree-insert
The tree contracts should be added lastly, to improve the performances.
import '@anticore-contracts/tree-insert/on.js'
import '@anticore-contracts/tree-insert/when.js'
- Matches
.anticore > [data-before]
.anticore > [data-after]
.anticore > [data-prepend]
.anticore > [data-append]
.anticore > [data-replace]
- Takes the value as a query selector to find the target
- Inserts the match
before
/after
/prepend
/append
/replace
the target