0.0.2 • Published 5 years ago

@zcorky/is-support-passive v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

is-support-passive

NPM version Coverage Status Dependencies Build Status license issues

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);

Related