lib/restructure/utils.js
function unsafeToSkipNode(node) {
    switch (node.type) {
        case 'Rule':
            // unsafe skip ruleset with selector similarities
            return hasSimilarSelectors(node.prelude.children, this);

        case 'Atrule':
            // can skip at-rules with blocks
            if (node.block) {
                // unsafe skip at-rule if block contains something unsafe to skip
                return node.block.children.some(unsafeToSkipNode, this);
            }
            break;

        case 'Declaration':
            return false;
    }

    // unsafe by default
    return true;
}
function unsafeToSkipNode(node) {
    switch (node.type) {
        case 'Rule':
            // unsafe skip ruleset with selector similarities
            return hasSimilarSelectors(node.prelude.children, this);

        case 'Atrule':
            // can skip at-rules with blocks
            if (node.block) {
                // unsafe skip at-rule if block contains something unsafe to skip
                return node.block.children.some(unsafeToSkipNode, this);
            }
            break;

        case 'Declaration':
            return false;
    }

    // unsafe by default
    return true;
}
function unsafeToSkipNode ( node ) { switch ( node . type ) { case 'Rule' : // unsafe skip ruleset with selector similarities return hasSimilarSelectors ( node . prelude . children , this ) ; case 'Atrule' : // can skip at-rules with blocks if ( node . block ) { // unsafe skip at-rule if block contains something unsafe to skip return node . block . children . some ( unsafeToSkipNode , this ) ; } break ; case 'Declaration' : return false ; } // unsafe by default return true ; }
test node can't to be skipped
test node can t to be skipped