blob: 09e3b1f2170fdb3f71ad27b8d9dc140339cb839a [file] [log] [blame]
Mathias Bynens79e2cf02020-05-29 16:46:17 +02001'use strict';
2
3/**
4 * Check if a statement has an block (empty or otherwise).
5 *
Tim van der Lippe4cb09742022-01-07 14:25:03 +01006 * @param {import('postcss').Container} statement
Mathias Bynens79e2cf02020-05-29 16:46:17 +02007 * @return {boolean} True if `statement` has a block (empty or otherwise)
8 */
Tim van der Lippe4cb09742022-01-07 14:25:03 +01009module.exports = function hasBlock(statement) {
Mathias Bynens79e2cf02020-05-29 16:46:17 +020010 return statement.nodes !== undefined;
11};