UNPKG

293 BJavaScriptView Raw
1'use strict';
2
3const { isRoot } = require('./typeGuards');
4
5/**
6 * @param {import('postcss').Node} node
7 * @returns {boolean}
8 */
9module.exports = function (node) {
10 if (isRoot(node)) return false;
11
12 const parentNode = node.parent;
13
14 return isRoot(parentNode) && node === parentNode.first;
15};