Skip to content

Commit

Permalink
feat: operators are all exported at the top level, from "rxjs".
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Jun 21, 2021
1 parent cfa6f83 commit 8e778be
Show file tree
Hide file tree
Showing 2 changed files with 218 additions and 0 deletions.
110 changes: 110 additions & 0 deletions spec/index-spec.ts
@@ -1,3 +1,4 @@
/** @prettier */
import * as index from '../src/index';
import { expect } from 'chai';

Expand Down Expand Up @@ -79,6 +80,115 @@ describe('index', () => {
expect(index.zip).to.exist;
});

it('should export all of the operators', () => {
expect(index.audit).to.exist;
expect(index.auditTime).to.exist;
expect(index.buffer).to.exist;
expect(index.bufferCount).to.exist;
expect(index.bufferTime).to.exist;
expect(index.bufferToggle).to.exist;
expect(index.bufferWhen).to.exist;
expect(index.catchError).to.exist;
expect(index.combineAll).to.exist;
expect(index.combineLatestAll).to.exist;
expect(index.combineLatestWith).to.exist;
expect(index.concatAll).to.exist;
expect(index.concatMap).to.exist;
expect(index.concatMapTo).to.exist;
expect(index.concatWith).to.exist;
expect(index.connect).to.exist;
expect(index.count).to.exist;
expect(index.debounce).to.exist;
expect(index.debounceTime).to.exist;
expect(index.defaultIfEmpty).to.exist;
expect(index.delay).to.exist;
expect(index.delayWhen).to.exist;
expect(index.dematerialize).to.exist;
expect(index.distinct).to.exist;
expect(index.distinctUntilChanged).to.exist;
expect(index.distinctUntilKeyChanged).to.exist;
expect(index.elementAt).to.exist;
expect(index.endWith).to.exist;
expect(index.every).to.exist;
expect(index.exhaust).to.exist;
expect(index.exhaustAll).to.exist;
expect(index.exhaustMap).to.exist;
expect(index.expand).to.exist;
expect(index.filter).to.exist;
expect(index.finalize).to.exist;
expect(index.find).to.exist;
expect(index.findIndex).to.exist;
expect(index.first).to.exist;
expect(index.groupBy).to.exist;
expect(index.ignoreElements).to.exist;
expect(index.isEmpty).to.exist;
expect(index.last).to.exist;
expect(index.map).to.exist;
expect(index.mapTo).to.exist;
expect(index.materialize).to.exist;
expect(index.max).to.exist;
expect(index.mergeAll).to.exist;
expect(index.flatMap).to.exist;
expect(index.mergeMap).to.exist;
expect(index.mergeMapTo).to.exist;
expect(index.mergeScan).to.exist;
expect(index.mergeWith).to.exist;
expect(index.min).to.exist;
expect(index.multicast).to.exist;
expect(index.observeOn).to.exist;
expect(index.pairwise).to.exist;
expect(index.pluck).to.exist;
expect(index.publish).to.exist;
expect(index.publishBehavior).to.exist;
expect(index.publishLast).to.exist;
expect(index.publishReplay).to.exist;
expect(index.raceWith).to.exist;
expect(index.reduce).to.exist;
expect(index.repeat).to.exist;
expect(index.repeatWhen).to.exist;
expect(index.retry).to.exist;
expect(index.retryWhen).to.exist;
expect(index.refCount).to.exist;
expect(index.sample).to.exist;
expect(index.sampleTime).to.exist;
expect(index.scan).to.exist;
expect(index.sequenceEqual).to.exist;
expect(index.share).to.exist;
expect(index.shareReplay).to.exist;
expect(index.single).to.exist;
expect(index.skip).to.exist;
expect(index.skipLast).to.exist;
expect(index.skipUntil).to.exist;
expect(index.skipWhile).to.exist;
expect(index.startWith).to.exist;
expect(index.subscribeOn).to.exist;
expect(index.switchAll).to.exist;
expect(index.switchMap).to.exist;
expect(index.switchMapTo).to.exist;
expect(index.switchScan).to.exist;
expect(index.take).to.exist;
expect(index.takeLast).to.exist;
expect(index.takeUntil).to.exist;
expect(index.takeWhile).to.exist;
expect(index.tap).to.exist;
expect(index.throttle).to.exist;
expect(index.throttleTime).to.exist;
expect(index.throwIfEmpty).to.exist;
expect(index.timeInterval).to.exist;
expect(index.timeout).to.exist;
expect(index.timeoutWith).to.exist;
expect(index.timestamp).to.exist;
expect(index.toArray).to.exist;
expect(index.window).to.exist;
expect(index.windowCount).to.exist;
expect(index.windowTime).to.exist;
expect(index.windowToggle).to.exist;
expect(index.windowWhen).to.exist;
expect(index.withLatestFrom).to.exist;
expect(index.zipAll).to.exist;
expect(index.zipWith).to.exist;
});

it('should expose configuration', () => {
expect(index.config).to.exist;
});
Expand Down
108 changes: 108 additions & 0 deletions src/index.ts
Expand Up @@ -98,3 +98,111 @@ export * from './internal/types';

/* Config */
export { config, GlobalConfig } from './internal/config';

/* Operators */
export { audit } from './internal/operators/audit';
export { auditTime } from './internal/operators/auditTime';
export { buffer } from './internal/operators/buffer';
export { bufferCount } from './internal/operators/bufferCount';
export { bufferTime } from './internal/operators/bufferTime';
export { bufferToggle } from './internal/operators/bufferToggle';
export { bufferWhen } from './internal/operators/bufferWhen';
export { catchError } from './internal/operators/catchError';
export { combineAll } from './internal/operators/combineAll';
export { combineLatestAll } from './internal/operators/combineLatestAll';
export { combineLatestWith } from './internal/operators/combineLatestWith';
export { concatAll } from './internal/operators/concatAll';
export { concatMap } from './internal/operators/concatMap';
export { concatMapTo } from './internal/operators/concatMapTo';
export { concatWith } from './internal/operators/concatWith';
export { connect } from './internal/operators/connect';
export { count } from './internal/operators/count';
export { debounce } from './internal/operators/debounce';
export { debounceTime } from './internal/operators/debounceTime';
export { defaultIfEmpty } from './internal/operators/defaultIfEmpty';
export { delay } from './internal/operators/delay';
export { delayWhen } from './internal/operators/delayWhen';
export { dematerialize } from './internal/operators/dematerialize';
export { distinct } from './internal/operators/distinct';
export { distinctUntilChanged } from './internal/operators/distinctUntilChanged';
export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged';
export { elementAt } from './internal/operators/elementAt';
export { endWith } from './internal/operators/endWith';
export { every } from './internal/operators/every';
export { exhaust } from './internal/operators/exhaust';
export { exhaustAll } from './internal/operators/exhaustAll';
export { exhaustMap } from './internal/operators/exhaustMap';
export { expand } from './internal/operators/expand';
export { filter } from './internal/operators/filter';
export { finalize } from './internal/operators/finalize';
export { find } from './internal/operators/find';
export { findIndex } from './internal/operators/findIndex';
export { first } from './internal/operators/first';
export { groupBy } from './internal/operators/groupBy';
export { ignoreElements } from './internal/operators/ignoreElements';
export { isEmpty } from './internal/operators/isEmpty';
export { last } from './internal/operators/last';
export { map } from './internal/operators/map';
export { mapTo } from './internal/operators/mapTo';
export { materialize } from './internal/operators/materialize';
export { max } from './internal/operators/max';
export { mergeAll } from './internal/operators/mergeAll';
export { flatMap } from './internal/operators/flatMap';
export { mergeMap } from './internal/operators/mergeMap';
export { mergeMapTo } from './internal/operators/mergeMapTo';
export { mergeScan } from './internal/operators/mergeScan';
export { mergeWith } from './internal/operators/mergeWith';
export { min } from './internal/operators/min';
export { multicast } from './internal/operators/multicast';
export { observeOn } from './internal/operators/observeOn';
export { pairwise } from './internal/operators/pairwise';
export { pluck } from './internal/operators/pluck';
export { publish } from './internal/operators/publish';
export { publishBehavior } from './internal/operators/publishBehavior';
export { publishLast } from './internal/operators/publishLast';
export { publishReplay } from './internal/operators/publishReplay';
export { raceWith } from './internal/operators/raceWith';
export { reduce } from './internal/operators/reduce';
export { repeat } from './internal/operators/repeat';
export { repeatWhen } from './internal/operators/repeatWhen';
export { retry } from './internal/operators/retry';
export { retryWhen } from './internal/operators/retryWhen';
export { refCount } from './internal/operators/refCount';
export { sample } from './internal/operators/sample';
export { sampleTime } from './internal/operators/sampleTime';
export { scan } from './internal/operators/scan';
export { sequenceEqual } from './internal/operators/sequenceEqual';
export { share } from './internal/operators/share';
export { shareReplay } from './internal/operators/shareReplay';
export { single } from './internal/operators/single';
export { skip } from './internal/operators/skip';
export { skipLast } from './internal/operators/skipLast';
export { skipUntil } from './internal/operators/skipUntil';
export { skipWhile } from './internal/operators/skipWhile';
export { startWith } from './internal/operators/startWith';
export { subscribeOn } from './internal/operators/subscribeOn';
export { switchAll } from './internal/operators/switchAll';
export { switchMap } from './internal/operators/switchMap';
export { switchMapTo } from './internal/operators/switchMapTo';
export { switchScan } from './internal/operators/switchScan';
export { take } from './internal/operators/take';
export { takeLast } from './internal/operators/takeLast';
export { takeUntil } from './internal/operators/takeUntil';
export { takeWhile } from './internal/operators/takeWhile';
export { tap } from './internal/operators/tap';
export { throttle } from './internal/operators/throttle';
export { throttleTime } from './internal/operators/throttleTime';
export { throwIfEmpty } from './internal/operators/throwIfEmpty';
export { timeInterval } from './internal/operators/timeInterval';
export { timeout } from './internal/operators/timeout';
export { timeoutWith } from './internal/operators/timeoutWith';
export { timestamp } from './internal/operators/timestamp';
export { toArray } from './internal/operators/toArray';
export { window } from './internal/operators/window';
export { windowCount } from './internal/operators/windowCount';
export { windowTime } from './internal/operators/windowTime';
export { windowToggle } from './internal/operators/windowToggle';
export { windowWhen } from './internal/operators/windowWhen';
export { withLatestFrom } from './internal/operators/withLatestFrom';
export { zipAll } from './internal/operators/zipAll';
export { zipWith } from './internal/operators/zipWith';

0 comments on commit 8e778be

Please sign in to comment.