Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

jbenvironment

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

jbenvironment

JBEnvironment is a library that provides features for the environment where JavaScript is running.

unpublished
latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

JBEnvironment

JBEnvironment is a library that provides features for the environment where JavaScript is running.

Properties

The properties of the JBEnvironment are shown below.

BrowserVer

console.log(JBEnvironment.BrowserVer);

Chrome

if (JBEnvironment.Chrome) {
    console.log('Running on Google Chrome browser');
}
else {
    console.log('Running on not Google Chrome browser');
}

Edge

if (JBEnvironment.Edge) {
    console.log('Running on Microsoft Edge browser');
}
else {
    console.log('Running on not Microsoft Edge browser');
}

Firefox

if (JBEnvironment.FireFox) {
    console.log('Running on Mozilla Firefox browser');
}
else {
    console.log('Running on not Mozilla Firefox browser');
}

Gecko

if (JBEnvironment.Gecko) {
    console.log('Browser base is Gecko');
}
else {
    console.log('Browser base is not Gecko');
}

IE

if (JBEnvironment.IE) {
    console.log('Running on Microsoft Internet Explorer browser');
}
else {
    console.log('Running on not Microsoft Internet Explorer browser');
}

Opera

if (JBEnvironment.Opera) {
    console.log('Running on Opera browser');
}
else {
    console.log('Running on not Opera browser');
}

Safari

if (JBEnvironment.Safari) {
    console.log('Running on Apple Safari browser');
}
else {
    console.log('Running on not Apple Safari browser');
}

WebKit

if (JBEnvironment.WebKit) {
    console.log('Browser base is Apple WebKit');
}
else {
    console.log('Browser base is not Apple WebKit');
}

Android

if (JBEnvironment.Android) {
    console.log('Running on Android device');
}
else {
    console.log('Running on not Android device');
}

IOS

if (JBEnvironment.IOS) {
    console.log('Running on iOS device');
}
else {
    console.log('Running on not iOS device');
}

IPad

if (JBEnvironment.IPad) {
    console.log('Running on iPad device');
}
else {
    console.log('Running on not iPad device');
}

IPhone

if (JBEnvironment.IPhone) {
    console.log('Running on iPhone device');
}
else {
    console.log('Running on not iPhone device');
}

Mobile

if (JBEnvironment.Mobile) {
    console.log('Running on mobile device');
}
else {
    console.log('Running on not mobile device');
}

Mac

if (JBEnvironment.Mac) {
    console.log('Running on Apple macOS system');
}
else {
    console.log('Running on not Apple macOS system');
}

Win

if (JBEnvironment.Win) {
    console.log('Running on Microsoft Windows system');
}
else {
    console.log('Running on not Microsoft Windows system');
}

Other properties

HTTPS

if (JBEnvironment.HTTPS) {
    console.log('Use SSL');
}
else {
    console.log('Not use SSL');
}

License

MIT License

Keywords

JBEnvironment

FAQs

Package last updated on 06 May 2018

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