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

universal-env

Package Overview
Dependencies
Maintainers
1
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 0.0.1 to 0.0.2

dist/env.factory.js

5

lib/index.js

@@ -9,3 +9,6 @@ 'use strict';

// https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename
var isWeb = exports.isWeb = (typeof navigator === 'undefined' ? 'undefined' : _typeof(navigator)) === 'object' && (navigator.appCodeName === 'Mozilla' || navigator.product === 'Gecko');
var isNode = exports.isNode = typeof process !== 'undefined' && !!(process.versions && process.versions.node);
var isWeex = exports.isWeex = typeof callNative === 'function';
var isWeb = exports.isWeb = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && _typeof(window.document) === 'object' && (typeof navigator === 'undefined' ? 'undefined' : _typeof(navigator)) === 'object' && typeof navigator.userAgent === 'string';
var isReactNative = exports.isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined';

8

package.json
{
"name": "universal-env",
"version": "0.0.1",
"version": "0.0.2",
"description": "A universal environment utilities.",

@@ -9,8 +9,8 @@ "license": "BSD-3-Clause",

"type": "git",
"url": "git+https://github.com/alibaba/rx.git"
"url": "git+https://github.com/alibaba/rax.git"
},
"bugs": {
"url": "https://github.com/alibaba/rx/issues"
"url": "https://github.com/alibaba/rax/issues"
},
"homepage": "https://github.com/alibaba/rx#readme"
"homepage": "https://github.com/alibaba/rax#readme"
}

@@ -1,1 +0,1 @@

# universal-env
# universal-env [![npm](https://img.shields.io/npm/v/universal-env.svg)](https://www.npmjs.com/package/universal-env)

@@ -1,2 +0,5 @@

export let isWeex = typeof callNative === 'function';
export let isWeb = typeof window === 'object' && typeof window.document === 'object' && typeof navigator === 'object' && typeof navigator.userAgent === 'string';
// https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename
export const isWeb = typeof navigator === 'object' && (navigator.appCodeName === 'Mozilla' || navigator.product === 'Gecko');
export const isNode = typeof process !== 'undefined' && !!(process.versions && process.versions.node);
export const isWeex = typeof callNative === 'function';
export const isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined';
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