Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@weex-project/env

Package Overview
Dependencies
Maintainers
11
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@weex-project/env

Get environment

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
11
Created
Source

Env

Weex get environment tool.

how to use

npm install @weex-project/env --save

example

isWeb

const Env = require('@weex-project/env')

// normal browser
Env.isWeb()

// iOS webview
Env.isWeb() && Env.isIOS()

// Android webview
Env.isWeb() && Env.isAndroid()

isApp

const Env = require('@weex-project/env')

// is my app
Env.isApp('MY_APP')

// is my app with legacy issues
Env.isApp(['MY_APP', 'MY_APP_LEGACY'])

isIOS

const Env = require('@weex-project/env')

// is ios
Env.isIOS()

isAndroid

const Env = require('@weex-project/env')

// is android
Env.isAndroid()

Keywords

FAQs

Package last updated on 29 Nov 2017

Did you know?

Socket

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.

Install

Related posts

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