@parity/light.js
Version:
A high-level reactive JS library optimized for light clients
40 lines (39 loc) • 1.21 kB
JavaScript
;
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
// SPDX-License-Identifier: MIT
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable @typescript-eslint/no-unused-vars */
var rxjs_1 = require("rxjs");
var memoizee = require("memoizee");
/**
* Observable that emits on every second.
*/
function onEverySecond$(options) {
return rxjs_1.timer(0, 1000);
}
exports.onEverySecond$ = onEverySecond$;
// @ts-ignore
// eslint-disable-next-line no-func-assign
exports.onEverySecond$ = onEverySecond$ = memoizee(onEverySecond$);
/**
* Observable that emits on every other second.
*/
function onEvery2Seconds$(options) {
return rxjs_1.timer(0, 2000);
}
exports.onEvery2Seconds$ = onEvery2Seconds$;
// @ts-ignore
// eslint-disable-next-line no-func-assign
exports.onEvery2Seconds$ = onEvery2Seconds$ = memoizee(onEvery2Seconds$);
/**
* Observable that emits every five seconds.
*/
function onEvery5Seconds$(options) {
return rxjs_1.timer(0, 5000);
}
exports.onEvery5Seconds$ = onEvery5Seconds$;
// @ts-ignore
// eslint-disable-next-line no-func-assign
exports.onEvery5Seconds$ = onEvery5Seconds$ = memoizee(onEvery5Seconds$);