mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
Update functions comments
This commit is contained in:
@@ -1,16 +1,19 @@
|
|||||||
/**
|
/**
|
||||||
* Check if argument is an object
|
* Determines if the argument is object-like.
|
||||||
* @param {?object} x - elemet to check
|
*
|
||||||
* @return {boolean} true if element is an object
|
* A value is object-like if it's not `null` and has a `typeof` result of "object".
|
||||||
|
*
|
||||||
|
* @param {*} x - The value to be checked.
|
||||||
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const isObject = x => (x && typeof x === 'object')
|
const isObject = x => (x && typeof x === 'object')
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if argument is function
|
* Determines if the argument is a function.
|
||||||
* @param {?function} x - element to check
|
*
|
||||||
* @return {boolean} true if element is a function
|
* @param {*} x - The value to be checked.
|
||||||
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const isFunction = x => x instanceof Function
|
const isFunction = x => x instanceof Function
|
||||||
|
|||||||
Reference in New Issue
Block a user