Summary
Code
"use strict";
var esprima_1 = require('esprima');
/**
* Represents a mutator which can remove the content of a BlockStatement.
*/
var BlockStatementMutator = (function () 0{
}{
function BlockStatementMutator() 1{
}{
this.name = 'BlockStatement';
this.types = [esprima_1.Syntax.BlockStatement];
}
BlockStatementMutator.prototype.applyMutations = function (node, copy) 2{
}{
var nodes = [];
if (3true4falsethis.canMutate(node)) 5{
}{
var mutatedNode = copy(node);
mutatedNode.body = [];
nodes.push(mutatedNode);
}
return nodes;
};
BlockStatementMutator.prototype.canMutate = function (node) 6{
}{
return !!(7node || this.types.indexOf(node.type) >= 0node && 8this.types.indexOf(node.type) < 09this.types.indexOf(node.type) > 0this.types.indexOf(node.type) >= 0);
};
;
return BlockStatementMutator;
}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = BlockStatementMutator;
//# sourceMappingURL=BlockStatementMutator.js.map