UNPKG

@lifaon/rx-js-light

Version:

Blazing fast Observables

18 lines (17 loc) 469 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fromIntersectionObserver = void 0; function fromIntersectionObserver(element, options) { return function (emit) { var observer = new IntersectionObserver(function (entries) { emit(entries[0]); }, options); observer.observe(element); return function () { observer.disconnect(); }; }; } exports.fromIntersectionObserver = fromIntersectionObserver;