Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
[![npm](https://img.shields.io/npm/v/@uni/env.svg)](https://www.npmjs.com/package/@uni/env)
判断和获取运行时环境
$ npm install @uni/env --save
import { isWeex, isWeb, isMiniApp, isNode, isWeChatMiniProgram, isByteDanceMicroApp, isBaiduSmartProgram, isKuaiShouMiniProgram } from '@uni/env';
你也可以从大包引入:
import { env } from '@uni/apis';
isWeex: boolean
校验 Weex 环境
isWeb: boolean
校验 Web 环境
isMiniApp: boolean
校验阿里小程序环境
isWeChatMiniProgram: boolean
校验微信小程序环境
isByteDanceMicroApp: boolean
校验字节跳动小程序环境
isBaiduSmartProgram: boolean
校验百度小程序环境
isKuaiShouMiniProgram: boolean
校验快手小程序环境
isNode: boolean
校验 Node.js 环境
注:以下各小程序 WebView 内容器判断依赖 WebView 中注入容器的JS SDK。
isMiniApp | isWeChatMiniProgram | isByteDanceMicroApp | isBaiduSmartProgram | isKuaiShouMiniProgram | isWeb | isWeex | isNode | |
---|---|---|---|---|---|---|---|---|
阿里小程序 | ✔️ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
阿里小程序 WebView | ✔️ | ✘ | ✘ | ✘ | ✘ | ✔️ | ✘ | ✘ |
微信小程序 | ✘ | ✔️ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
微信小程序 WebView | ✘ | ✔️ | ✘ | ✘ | ✘ | ✔️ | ✘ | ✘ |
字节跳动小程序 | ✘ | ✘ | ✔️ | ✘ | ✘ | ✘ | ✘ | ✘ |
字节跳动小程序 WebView | ✘ | ✘ | ✔️ | ✘ | ✘ | ✔️ | ✘ | ✘ |
百度小程序 | ✘ | ✘ | ✘ | ✔️ | ✘ | ✘ | ✘ | ✘ |
百度小程序 WebView | ✘ | ✘ | ✘ | ✔️ | ✘ | ✔️ | ✘ | ✘ |
快手小程序 | ✘ | ✘ | ✘ | ✘ | ✔️ | ✘ | ✘ | ✘ |
快手小程序 WebView | ✘ | ✘ | ✘ | ✘ | ✔️ | ✔️ | ✘ | ✘ |
Node | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✔️ |
Web | ✘ | ✘ | ✘ | ✘ | ✘ | ✔️ | ✘ | ✘ |
FAQs
[![npm](https://img.shields.io/npm/v/@uni/env.svg)](https://www.npmjs.com/package/@uni/env)
The npm package @uni/env receives a total of 0 weekly downloads. As such, @uni/env popularity was classified as not popular.
We found that @uni/env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.