Socket
Book a DemoInstallSign in
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
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
11
Weekly downloads
 
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

env

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.