UNPKG

394 BJavaScriptView Raw
1'use strict';
2
3/**
4 * Check if a statement has an empty block.
5 *
6 * @param {import('postcss').Rule | import('postcss').AtRule} statement - postcss rule or at-rule node
7 * @return {boolean} True if the statement has a block and it is empty
8 */
9module.exports = function (statement) {
10 return (
11 statement.nodes !== undefined && statement.nodes.length === 0 // has block
12 ); // and is empty
13};