MCPcopy Create free account
hub / github.com/Stanko/offset-polygon / iOS

Function iOS

demo/is-mobile-device.js:1–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1function iOS() {
2 return (
3 [
4 'iPad Simulator',
5 'iPhone Simulator',
6 'iPod Simulator',
7 'iPad',
8 'iPhone',
9 'iPod',
10 'Android',
11 ].includes(navigator.platform) ||
12 // iPad on iOS 13 detection
13 (navigator.userAgent.includes('Mac') && 'ontouchend' in document)
14 );
15}
16
17const isAndroid = navigator.userAgent.toLowerCase().indexOf('android');
18

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected