I can detect iOS 13 on iPhone but in iPad OS 13 navigator.platform
comes as MacIntel. So it is not possible to get iPad identified using below code, but it work
I did expand the implementation a little to make use of some more default browser features on iPad OS vs Mac OS Catalina. According to my tests on diverse iPads and all late iOS Devices this works well.
var isIPadOs = window.AuthenticatorAssertionResponse === undefined
&& window.AuthenticatorAttestationResponse === undefined
&& window.AuthenticatorResponse === undefined
&& window.Credential === undefined
&& window.CredentialsContainer === undefined
&& window.DeviceMotionEvent !== undefined
&& window.DeviceOrientationEvent !== undefined
&& navigator.maxTouchPoints === 5
&& navigator.plugins.length === 0
&& navigator.platform !== "iPhone";
Gist: https://gist.github.com/braandl/f7965f62a5fecc379476d2c055838e36