code: function typesMatch(ev, pointer) {
    return ev && pointer && ev.type.charAt(0) === pointer.type;
  }
docs: /*
  return whether the pointer's type matches the event's type.
  Eg if a touch event happens but the pointer has a mouse type, return false.