Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

estree-is-function

goto-bus-stop1.8mApache-2.01.0.0

check if an AST node is a function of some sort

arrow-function, check, detect, estree, function, functiondeclaration, functionexpression

readme

estree-is-function

check if an AST node is a function of some sort.

npm travis standard

Install

npm install estree-is-function

Usage

var isFunction = require('estree-is-function')
isFunction(parse('function a () {}')) // true
isFunction(parse('(function () {})')) // true
isFunction(parse('(() => {})')) // true
isFunction(parse('var x')) // false

License

Apache-2.0