Debian Codegraph @

estree-is-function/README.md

raw
1 # estree-is-function
2
3 check if an AST node is a function of some sort.
4
5 [![npm][npm-image]][npm-url]
6 [![travis][travis-image]][travis-url]
7 [![standard][standard-image]][standard-url]
8
9 [npm-image]: https://img.shields.io/npm/v/estree-is-function.svg?style=flat-square
10 [npm-url]: https://www.npmjs.com/package/estree-is-function
11 [travis-image]: https://img.shields.io/travis/goto-bus-stop/estree-is-function.svg?style=flat-square
12 [travis-url]: https://travis-ci.org/goto-bus-stop/estree-is-function
13 [standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
14 [standard-url]: http://npm.im/standard
15
16 ## Install
17
18 ```
19 npm install estree-is-function
20 ```
21
22 ## Usage
23
24 ```js
25 var isFunction = require('estree-is-function')
26 isFunction(parse('function a () {}')) // true
27 isFunction(parse('(function () {})')) // true
28 isFunction(parse('(() => {})')) // true
29 isFunction(parse('var x')) // false
30 ```
31
32 ## License
33
34 [Apache-2.0](LICENSE.md)