collection/keys.jsjavascript
/**
 * 返回对象的可枚举自有属性名。
 * @function keys
 * @memberof module:collection
 * @param {Object} object 要读取的普通对象
 * @returns {string[]} 属性名数组
 * @throws {TypeError} 参数不是对象时抛出
 */
function keys(object) {
  if (object === null || typeof object !== 'object') throw new TypeError('object must be an object')
  return Object.keys(object)
}

export default keys