• Version 1.1.1
  • Published
  • 82.5 kB
  • No dependencies
  • MIT license


npm i ismobilejs
yarn add ismobilejs
pnpm add ismobilejs


A simple JS library that detects mobile devices.



function isMobile

isMobile: (param?: IsMobileParameter) => isMobileResult;

    Type Aliases

    type IsMobileParameter

    type IsMobileParameter = UserAgent | Navigator;

      type isMobileResult

      type isMobileResult = {
      apple: {
      phone: boolean;
      ipod: boolean;
      tablet: boolean;
      universal: boolean;
      device: boolean;
      amazon: {
      phone: boolean;
      tablet: boolean;
      device: boolean;
      android: {
      phone: boolean;
      tablet: boolean;
      device: boolean;
      windows: {
      phone: boolean;
      tablet: boolean;
      device: boolean;
      other: {
      blackberry: boolean;
      blackberry10: boolean;
      opera: boolean;
      firefox: boolean;
      chrome: boolean;
      device: boolean;
      phone: boolean;
      tablet: boolean;
      any: boolean;
        type Navigator = {
        userAgent: string;
        platform: string;
        maxTouchPoints?: number;

          type UserAgent

          type UserAgent = string;

            Package Files (2)

            Dependencies (0)

            No dependencies.

            Dev Dependencies (7)

            Peer Dependencies (0)

            No peer dependencies.


            To add a badge like this badgeto your package's README, use the codes available below.

            You may also use to create a custom badge linking to

            • Markdown
            • HTML
              <a href=""><img src="" alt=""></a>