lib/standard.js
function isEmpty(ptr, propDesc, value) {

	if ((value === undefined) || (value === null))
		return true;

	if (propDesc.isArray() && !ptr.collectionElement && Array.isArray(value)) {
		if (value.length === 0)
			return true;
	} else if (propDesc.isMap() && !ptr.collectionElement &&
		((typeof value) === 'object')) {
		if (Object.keys(value).length === 0)
			return true;
	} else if ((propDesc.isScalar() || ptr.collectionElement) &&
		(propDesc.scalarValueType === 'string') &&
		((typeof value) === 'string')) {
		if (value.length === 0)
			return true;
	}

	return false;
}
function isEmpty(ptr, propDesc, value) {

	if ((value === undefined) || (value === null))
		return true;

	if (propDesc.isArray() && !ptr.collectionElement && Array.isArray(value)) {
		if (value.length === 0)
			return true;
	} else if (propDesc.isMap() && !ptr.collectionElement &&
		((typeof value) === 'object')) {
		if (Object.keys(value).length === 0)
			return true;
	} else if ((propDesc.isScalar() || ptr.collectionElement) &&
		(propDesc.scalarValueType === 'string') &&
		((typeof value) === 'string')) {
		if (value.length === 0)
			return true;
	}

	return false;
}
function isEmpty ( ptr , propDesc , value ) { if ( ( value === undefined ) || ( value === null ) ) return true ; if ( propDesc . isArray ( ) && ! ptr . collectionElement && Array . isArray ( value ) ) { if ( value . length === 0 ) return true ; } else if ( propDesc . isMap ( ) && ! ptr . collectionElement && ( ( typeof value ) === 'object' ) ) { if ( Object . keys ( value ) . length === 0 ) return true ; } else if ( ( propDesc . isScalar ( ) || ptr . collectionElement ) && ( propDesc . scalarValueType === 'string' ) && ( ( typeof value ) === 'string' ) ) { if ( value . length === 0 ) return true ; } return false ; }
Tell if the specified property value can be considered empty.

@private
@param {module:x2node-pointers~RecordElementPointer} ptr Property pointer.
@param {module:x2node-records~PropertyDescriptor} propDesc Property
descriptor.
@param {*} value Property value to test.
@returns {boolean} <code>true</code> if empty.
Tell if the specified property value can be considered empty .