Merge pull request #485 from Chalarangelo/atomiks-patch-3

Update isFunction.md
This commit is contained in:
Angelos Chalaris
2018-01-04 01:11:09 +02:00
committed by GitHub

View File

@ -5,10 +5,11 @@ Checks if the given argument is a function.
Use `typeof` to check if a value is classified as a function primitive.
```js
const isFunction = val => val && typeof val === 'function';
const isFunction = val => typeof val === 'function';
```
```js
isFunction(null); // false
isFunction('x'); // false
isFunction(x => x); // true
```