UNPKG

quicint

Version:

Quick initialize HTML5 EJS Boilerplate

19 lines (14 loc) 444 B
import GetOrientation from './getOrientation' import GetUaData from './getUaData' const IsIpad = (orientation = 'portrait'): boolean => { const clientData = GetUaData() if (!clientData.touchSupport) return false return ( clientData.type === 'laptop' && clientData.osName === 'mac-os' && clientData.browserName === 'safari' && clientData.touchSupport && GetOrientation() === orientation ) } export default IsIpad