UNPKG

js-wrench

Version:

JS函数库

15 lines (14 loc) 315 B
/** * @description 是否iPad * * @return {*} {boolean} 返回一个布尔值 * @example isiPad() => true|false */ const isiPad = (): boolean => { let userAgentInfo: string = navigator.userAgent if (userAgentInfo.indexOf('iPad') > -1) { return true } return false } export default isiPad