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 3.0.0 to 3.0.1

54

package.json
{
"name": "universal-env",
"author": "rax",
"version": "3.0.0",
"license": "BSD-3-Clause",
"main": "index.js",
"types": "lib/index.d.ts",
"version": "3.0.1",
"description": "",
"main": "lib/index.js",
"files": [
"src",
"lib",
"dist"
],
"scripts": {
"start": "rax-scripts start",
"build": "rax-scripts build",
"lint": "eslint --ext .js --ext .jsx --ext .ts --ext .tsx ./src",
"prebuild": "npm run lint",
"prepublish": "npm run build"
"start": "build-scripts start",
"build": "build-scripts build"
},
"pre-commit": [
"lint"
],
"keywords": [

@@ -21,28 +25,12 @@ "Rax"

},
"dependencies": {},
"devDependencies": {
"@types/jest": "^24.0.13",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"@typescript-eslint/parser": "^1.7.0",
"babel-eslint": "^10.0.1",
"driver-dom": "^1.0.0",
"eslint": "^5.15.1",
"eslint-config-rax": "^0.0.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-react": "^7.12.4",
"rax": "^1.0.4",
"rax-plugin-api-builder": "^0.0.1",
"rax-plugin-component": "^0.1.5",
"rax-scripts": "^2.0.0",
"@alib/build-scripts": "^0.1.0",
"build-plugin-rax-api-builder": "^0.1.0",
"build-plugin-rax-component": "^0.1.0",
"driver-universal": "^3.0.0",
"rax": "^1.1.0",
"rax-text": "^1.0.1",
"rax-view": "^1.0.2"
},
"repository": {
"type": "git",
"url": "https://github.com/raxjs/universal-api.git"
},
"bugs": {
"url": "https://github.com/raxjs/universal-api/issues"
},
"homepage": "https://github.com/raxjs/universal-api#readme"
"rax-view": "^1.0.2",
"typescript": "^3.7.5"
}
}

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

declare const callNative: any;
declare const WXEnvironment: any;

@@ -12,11 +11,8 @@ declare const __kraken__: any;

export const isWeb = !isUndef(typeof window) && 'onload' in window;
export const isNode =
!isUndef(typeof process) && !!(process.versions && process.versions.node);
export const isWeex =
!isUndef(typeof callNative) ||
!isUndef(typeof WXEnvironment) && WXEnvironment.platform !== 'Web';
export const isNode = !isUndef(typeof process) && !!(process.versions && process.versions.node);
export const isWeex = !isUndef(typeof WXEnvironment) && WXEnvironment.platform !== 'Web';
export const isKraken = !isUndef(typeof __kraken__);
export const isMiniApp = !isUndef(typeof my) && my !== null && !isUndef(my.alert);
export const isMiniApp = !isUndef(typeof my) && my !== null && !isUndef(typeof my.alert);
// In wechat mini program, wx.login is a function
// In wechat mini propgram webview, there is no wx.login, but exist wx.miniProgram
export const isWeChatMiniProgram = !isUndef(typeof wx) && wx !== null && (!isUndef(wx.login) || !isUndef(wx.miniProgram));
export const isWeChatMiniProgram = !isUndef(typeof wx) && wx !== null && (!isUndef(typeof wx.login) || !isUndef(typeof wx.miniProgram));
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