Skip to content

Commit

Permalink
Shorten isEmptyObject function [refactor]
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Apr 4, 2020
1 parent a6f0f8b commit f25f7d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ export function isFullString(arg) {
// Objects

export function isEmptyObject(arg) {
if (!isObject(arg)) return false;
return Object.keys(arg).length === 0;
return isObject(arg) && Object.keys(arg).length === 0;
}

// Numbers
Expand Down

0 comments on commit f25f7d7

Please sign in to comment.