Skip to content
On this page

🥕 对象操作

getObjKeys

获取对象的所有键

js
/**
 * @function getObjKeys
 * @description 获取对象的所有键
 * @param {object} obj
 * @returns {string[]}
 * @example
 * getObjKeys({a: 1, b: 2}) // ['a', 'b']
 */

isEmptyObject

是否为空对象

js
/**
 * @function isEmptyObject
 * @description 判断对象是否为空
 * @param {object} obj
 * @returns {boolean}
 * @example
 * isEmptyObject({}) // true
 * isEmptyObject({a: 1}) // false
 */

Released under the MIT License.