From 35428573b5f4dbcc8545fa510f07ed3aa724aaa0 Mon Sep 17 00:00:00 2001 From: Kai Mallea Date: Sat, 11 Apr 2020 00:08:46 -0400 Subject: [PATCH] improvement: move appleUniversal from any to apple.device --- src/isMobile.ts | 6 ++++-- types/isMobile.d.ts.map | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/isMobile.ts b/src/isMobile.ts index 65a3a01..9302bbc 100644 --- a/src/isMobile.ts +++ b/src/isMobile.ts @@ -83,7 +83,10 @@ export default function isMobile(userAgent?: string): isMobileResult { tablet: !match(appleIphone) && match(appleTablet) && !match(windowsPhone), universal: match(appleUniversal), device: - (match(appleIphone) || match(appleIpod) || match(appleTablet)) && + (match(appleIphone) || + match(appleIpod) || + match(appleTablet) || + match(appleUniversal)) && !match(windowsPhone), }, amazon: { @@ -132,7 +135,6 @@ export default function isMobile(userAgent?: string): isMobileResult { }; result.any = - result.apple.universal || result.apple.device || result.android.device || result.windows.device || diff --git a/types/isMobile.d.ts.map b/types/isMobile.d.ts.map index 2352663..00d70ab 100644 --- a/types/isMobile.d.ts.map +++ b/types/isMobile.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"isMobile.d.ts","sourceRoot":"","sources":["../src/isMobile.ts"],"names":[],"mappings":"AAmBA,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE;QACL,KAAK,EAAE,OAAO,CAAC;QACf,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,MAAM,EAAE;QACN,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,OAAO,EAAE;QACP,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,OAAO,EAAE;QACP,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,KAAK,EAAE;QACL,UAAU,EAAE,OAAO,CAAC;QACpB,YAAY,EAAE,OAAO,CAAC;QACtB,KAAK,EAAE,OAAO,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CAwFnE"} \ No newline at end of file +{"version":3,"file":"isMobile.d.ts","sourceRoot":"","sources":["../src/isMobile.ts"],"names":[],"mappings":"AAoBA,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE;QACL,KAAK,EAAE,OAAO,CAAC;QACf,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,OAAO,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,MAAM,EAAE;QACN,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,OAAO,EAAE;QACP,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,OAAO,EAAE;QACP,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,KAAK,EAAE;QACL,UAAU,EAAE,OAAO,CAAC;QACpB,YAAY,EAAE,OAAO,CAAC;QACtB,KAAK,EAAE,OAAO,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CA4FnE"} \ No newline at end of file