Checks whether or not a given node is a directive.
The directive is a `ExpressionStatement` which has only a string literal.
@param {ASTNode} node - A node to check.
@returns {boolean} Whether or not the node is a directive.
@private
507082
function isDirective(node) {
			return node.type === "ExpressionStatement" &&
				node.expression.type === "Literal" &&
				typeof node.expression.value === "string";
		}
617036
function isInActiveContentEditable(node) {
        while (node) {
            if ( node.getAttribute &&
                 node.getAttribute("contenteditable") &&
                 node.getAttribute("contenteditable").toUpperCase() === "TRUE" ) {
                return true
            }

            node = node.parentNode
        }

        return false
    }
140946
function astValue(node) {

  switch (node.type) {

  case 'ExpressionStatement':
    return astValue(node.expression);

  case 'ObjectExpression':
    return node.properties.reduce(
      (obj, prop) => Object.assign(obj, {[prop.key.value]: astValue(prop.value)}),
      {}
    );

  case 'ArrayExpression':
    return node.elements.map(element => astValue(element));

  case 'Literal':
    return node.value;

  default:
    throw new Error(`Unexpected ast node type: ${node.type}`);

  }
}
1023704
function isHTMLNode(html) {
    if (typeof HTMLElement === 'object') {
        return (html && (html instanceof HTMLElement || !!html.nodeType));
    }

    return !!(html && html.nodeType);
}
738587
def is_docstring(node):
    
    return (node.type == syms.simple_stmt and
            len(node.children) > 0 and node.children[0].type == token.STRING)
816119
function(node) {
			return (this.hasTagsInContent(node) && this.isBlock(node)) 
				|| node.children.some(function(child) {
					return this.isBlock(child);
				}, this);
		}
634359
function isPropertyDescriptor(node) {

    // Object.defineProperty(obj, "foo", {set: ...})
    if (isArgumentOfMethodCall(node, 2, "Object", "defineProperty") ||
        isArgumentOfMethodCall(node, 2, "Reflect", "defineProperty")
    ) {
        return true;
    }

    /*
     * Object.defineProperties(obj, {foo: {set: ...}})
     * Object.create(proto, {foo: {set: ...}})
     */
    const grandparent = node.parent.parent;

    return grandparent.type === "ObjectExpression" && (
        isArgumentOfMethodCall(grandparent, 1, "Object", "create") ||
        isArgumentOfMethodCall(grandparent, 1, "Object", "defineProperties")
    );
}
716197
function isStatement(node) {
        switch (node.type) {
        case Syntax.BlockStatement:
        case Syntax.BreakStatement:
        case Syntax.CatchClause:
        case Syntax.ContinueStatement:
        case Syntax.ClassDeclaration:
        case Syntax.ClassBody:
        case Syntax.DirectiveStatement:
        case Syntax.DoWhileStatement:
        case Syntax.DebuggerStatement:
        case Syntax.EmptyStatement:
        case Syntax.ExpressionStatement:
        case Syntax.ForStatement:
        case Syntax.ForInStatement:
        case Syntax.ForOfStatement:
        case Syntax.FunctionDeclaration:
        case Syntax.IfStatement:
        case Syntax.LabeledStatement:
        case Syntax.Program:
        case Syntax.ReturnStatement:
        case Syntax.SwitchStatement:
        case Syntax.SwitchCase:
        case Syntax.ThrowStatement:
        case Syntax.TryStatement:
        case Syntax.VariableDeclaration:
        case Syntax.VariableDeclarator:
        case Syntax.WhileStatement:
        case Syntax.WithStatement:
            return true;
        }
        return false;
    }
823821
function isParenthesisOfAddition(node) {
  if (!Node.Type.isParenthesis(node)) {
    return false;
  }
  const content = node.content;
  return Node.Type.isOperator(content, '+');
}
686279
function(node) {
      if (utils.isExplicitComponent(node)) {
        return true;
      }

      if (!node.superClass) {
        return false;
      }
      return new RegExp('^(' + pragma + '\\.)?(Pure)?Component$').test(sourceCode.getText(node.superClass));
    }
701609
function compileElement(node, scope, isRoot) {
        var tagName = node.tagName
        var inst
        switch(true) {
            /**
             *  <*-if></*-if>
             */
            case is.IfElement(tagName):
                var children = _slice(node.children)
                var exprs = [$(node).attr('is')]
                children.forEach(function(c) {
                    if (is.ElseElement(c)) {
                        exprs.push($(c).attr(conf.namespace + 'else') || '')
                    }
                })
                inst = new ElementDirective(
                        vm, 
                        scope,
                        node, 
                        elements['if'], 
                        NS + 'if', 
                        exprs
                )
                if (!isRoot) {
                    inst.$mount(node)
                }
                // save elements refs
                _directives.push(inst)
                // save bindins to scope
                _setBindings2Scope(scope, inst)
                return inst
            /**
             *  <*-repeat></*-repeat>
             */
            case is.RepeatElement(tagName):
                inst = new ElementDirective(
                        vm, 
                        scope,
                        node, 
                        elements.repeat,
                        NS + 'repeat', 
                        $(node).attr('items')
                )
                if (!isRoot) {
                    inst.$mount(node)
                }
                _directives.push(inst)
                _setBindings2Scope(scope, inst)
                return inst
        }
    }
1370041
function isElement(o){
  var DOM_ELEMENT = 1
  return (
    typeof HTMLElement === "object" ? o instanceof HTMLElement : //DOM2
      o && typeof o === "object" && o !== null && o.nodeType === DOM_ELEMENT && typeof o.nodeName==="string"
  )
}
1154409
function isDirectivePrologue(node, sourceCode) {
    if (isDirective(node, sourceCode)) {
        for (const sibling of node.parent.body) {
            if (sibling === node) {
                break;
            }
            if (!isDirective(sibling, sourceCode)) {
                return false;
            }
        }
        return true;
    }
    return false;
}
114950
private static function isNonExpressionStmt(Node $node)
    {
        return $node instanceof Stmt &&
            !$node instanceof Expression &&
            !$node instanceof Return_ &&
            !$node instanceof Namespace_;
    }
568235
function isImmutable(node) {
  if (t.isType(node.type, "Immutable")) return true;

  if (t.isLiteral(node)) {
    if (node.regex) {
      // regexs are mutable
      return false;
    } else {
      // immutable!
      return true;
    }
  } else if (t.isIdentifier(node)) {
    if (node.name === "undefined") {
      // immutable!
      return true;
    } else {
      // no idea...
      return false;
    }
  }

  return false;
}
40167
function isValidElement (node) {
  const name = node.name
  return (
    name === 'input' ||
    name === 'select' ||
    name === 'textarea' ||
    (
      name !== 'keep-alive' &&
      name !== 'slot' &&
      name !== 'transition' &&
      name !== 'transition-group' &&
      utils.isCustomComponent(node)
    )
  )
}
497868
function isStrict(node) {
        if (node.type === 'Program' && node.sourceType === 'module') 
            return true;
        var nodes;
        if (node.type === 'Program') 
            nodes = node.body;
         else if (examine(node).isFunction) 
            nodes = node.body.body;
         else 
            return false;
        if (nodes) 
            for (var i = 0;i < nodes.length; i++) 
            if (examine(nodes[i]).isDirective && nodes[i].expression.value.match(/^\s*use\s+strict\s*$/)) 
            return true;
        return false;
    }