Skip to content

Instantly share code, notes, and snippets.

@3200pro
Created July 26, 2022 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3200pro/7b510f3da749bdbeca27727957777dc7 to your computer and use it in GitHub Desktop.
Save 3200pro/7b510f3da749bdbeca27727957777dc7 to your computer and use it in GitHub Desktop.
Check if the object is empty
const isEmpty = obj => Reflect.ownKeys(obj).length === 0 && obj.constructor === Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment