examples/rulesdir/rules/no-todo.js
function getParents(node) {
    var result = [];
    var parent = node.parent;
    while (parent != null) {
        result.push(parent);
        parent = parent.parent;
    }
    return result;
}
function getParents(node) {
    var result = [];
    var parent = node.parent;
    while (parent != null) {
        result.push(parent);
        parent = parent.parent;
    }
    return result;
}
function getParents ( node ) { var result = [ ] ; var parent = node . parent ; while ( parent != null ) { result . push ( parent ) ; parent = parent . parent ; } return result ; }
Get parents of node.
The parent nodes are returned in order from the closest parent to the outer ones.
@param node
@returns {Array}
Get parents of node . The parent nodes are returned in order from the closest parent to the outer ones .