'use strict';

// MODULES //

var keys = require( 'object-keys' );
var isPlainObject = require( '@stdlib/utils/is-plain-object' );
var hasSymbolSupport = require( '@stdlib/utils/detect-symbol-support' );


// MAIN //

/**
* Tests if a value is an empty object.
*
* @param {*} value - value to test
* @returns {boolean} boolean indicating whether value is an empty object
*
* @example
* var bool = isEmptyObject( {} );
* // returns true
* @example
* var bool = isEmptyObject( { 'beep': 'boop' } );
* // returns false
* @example
* var bool = isEmptyObject( [] );
* // returns false
*/
function isEmptyObject( value ) {
	if ( !isPlainObject( value ) ) {
		return false;
	}
	if ( keys( value ).length > 0 ) {
		return false;
	}
	if (
		hasSymbolSupport &&
		Object.getOwnPropertySymbols( value ).length > 0
	) {
		return false;
	}
	return true;
} // end FUNCTION isEmptyObject()


// EXPORTS //

module.exports = isEmptyObject;

'use strict';

// MODULES //

var keys = require( 'object-keys' );
var isPlainObject = require( '@stdlib/utils/is-plain-object' );
var hasSymbolSupport = require( '@stdlib/utils/detect-symbol-support' );


// MAIN //

/**
* Tests if a value is an empty object.
*
* @param {*} value - value to test
* @returns {boolean} boolean indicating whether value is an empty object
*
* @example
* var bool = isEmptyObject( {} );
* // returns true
* @example
* var bool = isEmptyObject( { 'beep': 'boop' } );
* // returns false
* @example
* var bool = isEmptyObject( [] );
* // returns false
*/
function isEmptyObject( value ) {
	if ( !isPlainObject( value ) ) {
		return false;
	}
	if ( keys( value ).length > 0 ) {
		return false;
	}
	if (
		hasSymbolSupport() &&
		Object.getOwnPropertySymbols( value ).length > 0
	) {
		return false;
	}
	return true;
} // end FUNCTION isEmptyObject()


// EXPORTS //

module.exports = isEmptyObject;

Fix bug by calling hasSymbolSupport function
Fix bug by calling hasSymbolSupport function
