import pointer from "./pointer.js"; import sourceEvent from "./sourceEvent.js"; export default function(events, node) { if (events.target) { // i.e., instanceof Event, not TouchList or iterable events = sourceEvent(events); if (node === undefined) node = events.currentTarget; events = events.touches || [events]; } return Array.from(events, event => pointer(event, node)); }