Skip to content

Commit

Permalink
完善功能: 完善yd_is_object函数说明
Browse files Browse the repository at this point in the history
  • Loading branch information
chenbimo committed Aug 6, 2024
1 parent c24f33d commit 1ae39ae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/is/object.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/**
* 判断是否是Object值
* @author 陈随易 <https://chensuiyi.me>
* @category is
* @alias yd_is_object
* @category is
* @param {any} value 任意值
* @returns {Boolean} 返回是否是Object值
* @returns {boolean} 返回是否是Object值
* @author 陈随易 <https://chensuiyi.me>
* @example yd_is_object({}) // true
*/
export default (variable) => {
return variable !== null && typeof variable === 'object' && Object.prototype.toString.call(variable) === '[object Object]';
export default (value) => {
return value !== null && typeof value === 'object' && Object.prototype.toString.call(value) === '[object Object]';
};

0 comments on commit 1ae39ae

Please sign in to comment.