For ECMAScript5 (not supported in all browsers yet though), you can use:
Object.keys(obj).length === 0
More Related Contents:
- How to Protect website code PHP / JS? [closed]
- How to receive special character?
- jQuery AJAX file upload PHP
- How to decode HTML entities using jQuery?
- Firing event on DOM attribute change
- Add method to string class
- Are braces necessary in one-line statements in JavaScript?
- jQuery post() with serialize and extra data
- require is not defined? Node.js
- Triggering a JavaScript click() event at specific coordinates
- Getting a UnhandledPromiseRejectionWarning when testing using mocha/chai
- How to read a local text file in the browser?
- Javascript get “clicked” element addEventListener
- Listening for Youtube Event in JavaScript or jQuery
- How to check if character is a letter in Javascript?
- Performance – Date.now() vs Date.getTime()
- How do you find out the caller function in JavaScript when use strict is enabled?
- Is it OK to add your own attributes to HTML elements? [duplicate]
- How to check if a variable is not null?
- RegEx: How can I match all numbers greater than 49?
- When should I use delete vs setting elements to null in JavaScript? [duplicate]
- Age from Date of Birth using JQuery
- Does new React Context API trigger re-renders?
- Angular UI Router: decide child state template on the basis of parent resolved object
- Google Maps API 3 – zoom not honored
- How much data / information can we save / store in a QR code?
- Crop Functionality using FabricJs
- Prevent a link to reload page
- Do duplicate ID values screw up jQuery selectors?
- How to connect two points in Google map..?