1
0
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:
Lucas Vallenet
2022-06-02 16:45:31 +02:00
parent ebb55769f9
commit cf3f40c956

View File

@@ -1,16 +1,19 @@
/**
* Check if argument is an object
* @param {?object} x - elemet to check
* @return {boolean} true if element is an object
* Determines if the argument is object-like.
*
* 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')
/**
* Check if argument is function
* @param {?function} x - element to check
* @return {boolean} true if element is a function
* Determines if the argument is a function.
*
* @param {*} x - The value to be checked.
* @return {boolean}
*/
const isFunction = x => x instanceof Function