(parent: Container | undefined, selector: string)
| 16 | } from '../lib/postcss.js' |
| 17 | |
| 18 | function hasAlready(parent: Container | undefined, selector: string): boolean { |
| 19 | if (typeof parent === 'undefined') return false |
| 20 | return ( |
| 21 | parent.nodes?.some(i => { |
| 22 | return i.type === 'rule' && i.selectors.includes(selector) |
| 23 | }) ?? false |
| 24 | ) |
| 25 | } |
| 26 | |
| 27 | function addIndex(array: any[][]): any[][] { |
| 28 | return array.map((i, index) => { |