Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

universal-env

Package Overview
Dependencies
Maintainers
5
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

universal-env - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

8

lib/index.js

@@ -12,8 +12,8 @@ "use strict";

exports.isWeex = isWeex;
var isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined'; // In taobao mp'webview __sfc__ is an object
var isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined';
exports.isReactNative = isReactNative;
var isMiniApp = typeof my === 'object' && typeof my.getSystemInfo !== 'undefined' || isTaoWebview;
var isMiniApp = typeof my === 'object' && typeof my.getSystemInfo !== 'undefined' && !isTaoWebview;
exports.isMiniApp = isMiniApp;
var isWechatApp = typeof wx === 'object' && typeof wx.getSystemInfo !== 'undefined';
var isWechatApp = typeof wx === 'object' && typeof wx.getSystemInfo !== 'undefined'; // In taobao mp'webview __sfc__ is an object
exports.isWechatApp = isWechatApp;

@@ -20,0 +20,0 @@ var isWeb = isWebPure && !isMiniApp && !isWechatApp || isTaoWebview;

{
"name": "universal-env",
"author": "rax",
"version": "1.0.5",
"version": "1.0.6",
"license": "BSD-3-Clause",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -13,6 +13,5 @@ // https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename

export const isReactNative: boolean = typeof __fbBatchedBridgeConfig !== 'undefined';
export const isMiniApp: boolean = typeof my === 'object' && typeof my.getSystemInfo !== 'undefined' && !isTaoWebview;
export const isWechatApp: boolean = typeof wx === 'object' && typeof wx.getSystemInfo !== 'undefined';
// In taobao mp'webview __sfc__ is an object
export const isMiniApp: boolean = typeof my === 'object' && typeof my.getSystemInfo !== 'undefined' || isTaoWebview;
export const isWechatApp: boolean = typeof wx === 'object' && typeof wx.getSystemInfo !== 'undefined';
export const isWeb: boolean = isWebPure && !isMiniApp && !isWechatApp || isTaoWebview;

@@ -19,0 +18,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc