* Check whether the given value is an ASTNode or not. * @param {any} node The value to check. * @param {ESQueryOptions|undefined} options The options to use. * @returns {boolean} `true` if the value is an ASTNode.
(node, options)
| 421 | * @returns {boolean} `true` if the value is an ASTNode. |
| 422 | */ |
| 423 | function isNode(node, options) { |
| 424 | const nodeTypeKey = (options && options.nodeTypeKey) || 'type'; |
| 425 | return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string'; |
| 426 | } |
| 427 | |
| 428 | /** |
| 429 | * Determines if the given node has a sibling that matches the |