@zcorky/is-support-passive
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @zcorky/is-support-passive

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

4.48 kB

Total Files

5

Last publish

Collaborators

  • uniquecolesmith