function getListeners( element, name = undefined, capture = false ) {
	let arr = getEventListenerDataArray( element, capture );

	if ( name ) {
		arr = arr.filter( data => data.name === name );
	}

	return arr.map( ({ name, handler }) => ({ name, handler }) );
}
@param {Element} element
@param {string?} name
@param {boolean?} capture
@returns {{handler: EventListenerData.handler, name: EventListenerData.name}[]}