
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
universal-env
Advanced tools
Judge runtime environment
$ npm install universal-env --save
import { isWeex, isWeb, isMiniApp, isNode, isWeChatMiniProgram, isByteDanceMicroApp, isQuickApp } from 'universal-env';
isWeex: boolean
Checks if environment is a weex environment.
isWeb: boolean
Checks if environment is a web environment.
isMiniApp: boolean
Checks if environment is an alibaba miniprogram environment.
isWeChatMiniProgram: boolean
Checks if environment is a wechat miniprogram environment.
isByteDanceMicroApp: boolean
Checks if environment is a bytedance microapp environment.
isQuickApp: boolean
Checks if environment is a quickapp environment.
isNode: boolean
Checks if environment is a Node.js environment.
Note:To judge MiniProgram env in WebView, please insert JS SDK accordingly.
isMiniApp | isWeChatMiniProgram | isByteDanceMicroApp | isQuickApp | isWeb | isWeex | isNode | |
---|---|---|---|---|---|---|---|
Alibaba MiniApp | ✔️ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
Alibaba MiniApp WebView | ✔️ | ✘ | ✘ | ✘ | ✔️ | ✘ | ✘ |
Wechat MiniProgram | ✘ | ✔️ | ✘ | ✘ | ✘ | ✘ | ✘ |
Wechat MiniProgram WebView | ✘ | ✔️ | ✘ | ✘ | ✔️ | ✘ | ✘ |
ByteDance MicroApp | ✘ | ✘ | ✔️ | ✘ | ✘ | ✘ | ✘ |
ByteDance MicroApp WebView | ✘ | ✘ | ✔️ | ✘ | ✔️ | ✘ | ✘ |
QuickApp | ✘ | ✘ | ✘ | ✔️ | ✘ | ✘ | ✘ |
QuickApp WebView | ✘ | ✘ | ✘ | ✘ | ✔️ | ✘ | ✘ |
Weex | ✘ | ✘ | ✘ | ✘ | ✘ | ✔️ | ✘ |
Node | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✔️ |
Web | ✘ | ✘ | ✘ | ✘ | ✔️ | ✘ | ✘ |
FAQs
The npm package universal-env receives a total of 3,652 weekly downloads. As such, universal-env popularity was classified as popular.
We found that universal-env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.