Code coverage report for 6to5/transformation/transformers/_block-hoist.js

Statements: 100% (8 / 8)      Branches: 100% (2 / 2)      Functions: 100% (2 / 2)      Lines: 100% (8 / 8)      Ignored: none     

All files » 6to5/transformation/transformers/ » _block-hoist.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 181     515   515 920 6 6   914       515      
exports.BlockStatement =
exports.Program = {
  exit: function (node) {
    var unshift = [];
 
    node.body = node.body.filter(function (bodyNode) {
      if (bodyNode._blockHoist) {
        unshift.push(bodyNode);
        return false;
      } else {
        return true;
      }
    });
 
    node.body = unshift.concat(node.body);
  }
};