Options
All
  • Public
  • Public/Protected
  • All
Menu

Module device/version

Index

Functions

getAndroidVersion

0.0.36 provide
  • getAndroidVersion(ua?: string): string | undefined

getIosVersion

0.0.36 provide
  • getIosVersion(ua?: string): string | undefined

getOsVersion

0.0.36 provide
  • getOsVersion(): OsVersion
  • 获取客户端系统版本

    remarks

    只能判断手机客户端版本

    example

    简单实用

    import { device } from 'onex-utils';
    
    const osInfo = device.getOsVersion();
    console.log(osInfo.isIos); // true
    console.log(osInfo.isAndroid); // false
    console.log(osInfo.version); // 12.0.2
    

    Returns OsVersion

Const isAndroid

0.0.36 provide
  • isAndroid(ua?: string): boolean

Const isIos

0.0.36 provide
  • isIos(ua?: string): boolean