mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-19 04:25:32 +00:00
24 lines
538 B
JavaScript
24 lines
538 B
JavaScript
// NOTICE: This file is generated by Rollup. To modify it,
|
|
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
|
|
'use strict';
|
|
|
|
const typeGuards = require('./typeGuards.cjs');
|
|
|
|
/**
|
|
* @param {import('postcss').Node} node
|
|
* @returns {boolean}
|
|
*/
|
|
function isFirstNodeOfRoot(node) {
|
|
if (typeGuards.isRoot(node)) return false;
|
|
|
|
const parentNode = node.parent;
|
|
|
|
if (!parentNode) {
|
|
return false;
|
|
}
|
|
|
|
return typeGuards.isRoot(parentNode) && node === parentNode.first;
|
|
}
|
|
|
|
module.exports = isFirstNodeOfRoot;
|