UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

13 lines (9 loc) 240 B
'use strict'; // return the closest rule module.exports = (node) => { let selectorParent = node.parent; while (selectorParent && selectorParent.type !== 'rule') { selectorParent = selectorParent.parent; } return selectorParent; };