@zcorky/is-support-passive
v0.0.2
Published
Give a is-support-passive for your app.
Downloads
464
Readme
is-support-passive
Check whether a website is up or down using the isitup.org API
Install
$ npm install @zcorky/is-support-passive
Usage
import isSupportPassive from '@zcorky/is-support-passive';
// const isUp = require('@zcorky/is-support-passive').isUp;
const passiveOptions = isSupportPassive() ? {
passive: true,
capture: false,
} : false;
window.addEventListener('scroll', handler, passiveOptions);