examples/rulesdir/rules/no-todo.js
function isNodeWrapped(node, types) {
    var parents = getParents(node);
    var parentsTypes = parents.map(function(parent) {
        return parent.type;
    });
    return types.some(function(type) {
        return parentsTypes.some(function(parentType) {
            return parentType === type;
        });
    });
}
function isNodeWrapped(node, types) {
    var parents = getParents(node);
    var parentsTypes = parents.map(function(parent) {
        return parent.type;
    });
    return types.some(function(type) {
        return parentsTypes.some(function(parentType) {
            return parentType === type;
        });
    });
}
function isNodeWrapped ( node , types ) { var parents = getParents ( node ) ; var parentsTypes = parents . map ( function ( parent ) { return parent . type ; } ) ; return types . some ( function ( type ) { return parentsTypes . some ( function ( parentType ) { return parentType === type ; } ) ; } ) ; }
Return true if `node` is wrapped any one of `types`.
@param {TxtNode} node is target node
@param {string[]} types are wrapped target node
@returns {boolean}
Return true if node is wrapped any one of types .