Show More
Commit Description:
utf8mb4
Commit Description:
utf8mb4
References:
File last commit:
Show/Diff file:
Action:
node_modules/estree-is-function/index.js
| 11 lines
| 412 B
| application/javascript
| JavascriptLexer
|
r789 | module.exports = function isFunction (node) { | |||
if (typeof node !== 'object' || !node) { | ||||
throw new TypeError('estree-is-function: node must be an object') | ||||
} | ||||
if (typeof node.type !== 'string') { | ||||
throw new TypeError('estree-is-function: node must have a string type') | ||||
} | ||||
return node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression' | ||||
} | ||||