universal-env
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"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)); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
8
4688
6
1
54
1
1
1