/is-headless

Check whenever user's browser is headless or not

Primary LanguageJavaScript

Install

npm i border-radius/is-headless

Require

const isHeadless = require('is-headless');

or

import isHeadless from 'is-headless';

Use

isHeadless().then(browserIsHeadless => {
    if (browserIsHeadless) {
        window.close();
    }
});