universal-env
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -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'; |
{ | ||
"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'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
20122
10
157
0