UNPKG

pure-conditions

Version:
9 lines (8 loc) 260 B
function hasKeys (object) { if (object instanceof Map || object instanceof Set) return !!object.size for (const property in object) { if (Object.prototype.hasOwnProperty.call(object, property)) return true } return false } module.exports = hasKeys