0.1.10 • Published 3 years ago

@glorious/fyzer v0.1.10

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

Fyzer

The easiest way to be notified when some element appears above the page fold

CircleCI Coverage Status

Installation

$ npm install -S @glorious/fyzer

Usage

import fyzer from '@glorious/fyzer';

const element = document.querySelector('#myElement');

const subscriptionId = fyzer.subscribe(element, () => {
  // This function will be called every time
  // element appears above the fold.
});

// When you no longer needs to observe the element's position,
// you can unsubscribe from Fyzer:
fyzer.unsubscribe(subscriptionId);

Contributing

  1. Install Node. Download the "Recommend for Most Users" version.

  2. Clone the repo:

git clone git@github.com:glorious-codes/glorious-fyzer.git
  1. Go to the project directory:
cd glorious-fyzer
  1. Install the project dependencies:
npm install

Tests

Ensure that all code that you have added is covered with unit tests:

npm run test -- --coverage
0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

4 years ago

0.1.0

5 years ago