Skip to content

Commit

Permalink
feat(main): export operators and sources as curried by default
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Oct 15, 2016
1 parent d9d12b0 commit 9a52465
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 16 deletions.
33 changes: 23 additions & 10 deletions src/main.ts
Expand Up @@ -6,15 +6,28 @@
export {Observer} from './lib/Observer'

// Operators
export {filter} from './operators/Filter'
export {join} from './operators/Join'
export {map} from './operators/Map'
export {scan} from './operators/Scan'
export {slice} from './operators/Slice'
export {tap} from './operators/Tap'
export {reduce} from './operators/Reduce'
import {filter as _filter} from './operators/Filter'
import {join as _join} from './operators/Join'
import {map as _map} from './operators/Map'
import {scan as _scan} from './operators/Scan'
import {slice as _slice} from './operators/Slice'
import {tap as _tap} from './operators/Tap'
import {reduce as _reduce} from './operators/Reduce'

// Sources
export {fromArray} from './sources/FromArray'
export {interval} from './sources/Interval'
export {fromDOM} from './sources/FromDOM'
import {fromArray as _fromArray} from './sources/FromArray'
import {interval as _interval} from './sources/Interval'
import {fromDOM as _fromDOM} from './sources/FromDOM'
import {Curry} from './lib/Curry'


export const filter = Curry(_filter)
export const join = Curry(_join)
export const map = Curry(_map)
export const scan = Curry(_scan)
export const slice = Curry(_slice)
export const tap = Curry(_tap)
export const reduce = Curry(_reduce)
export const fromArray = Curry(_fromArray)
export const interval = Curry(_interval)
export const fromDOM = Curry(_fromDOM)
3 changes: 2 additions & 1 deletion test/test.FromArray.ts
Expand Up @@ -5,9 +5,10 @@
'use strict'

import test from 'ava'
import {fromArray, map} from '../src/main'
import {TestScheduler} from '../src/testing/TestScheduler'
import {ReactiveEvents} from '../src/testing/ReactiveEvents'
import {map} from '../src/operators/Map'
import {fromArray} from '../src/sources/FromArray'

const {next, error} = ReactiveEvents
test(t => {
Expand Down
2 changes: 1 addition & 1 deletion test/test.IntervalObservable.ts
Expand Up @@ -5,10 +5,10 @@
'use strict'

import test from 'ava'
import {interval} from '../src/main'
import {TestScheduler} from '../src/testing/TestScheduler'
import {ReactiveEvents, EventError} from '../src/testing/ReactiveEvents'
import {IEvent} from '../src/types/IEvent'
import {interval} from '../src/sources/Interval'
const {next, error} = ReactiveEvents

test('subscribe()', t => {
Expand Down
2 changes: 1 addition & 1 deletion test/test.JoinObservable.ts
Expand Up @@ -3,9 +3,9 @@
*/

import test from 'ava'
import {join} from '../src/main'
import {TestScheduler} from '../src/testing/TestScheduler'
import {ReactiveEvents} from '../src/testing/ReactiveEvents'
import {join} from '../src/operators/Join'
const {next, complete} = ReactiveEvents

test('subscribe()', t => {
Expand Down
2 changes: 1 addition & 1 deletion test/test.MapObservable.ts
Expand Up @@ -5,9 +5,9 @@
'use strict'

import test from 'ava'
import {map} from '../src/main'
import {TestScheduler} from '../src/testing/TestScheduler'
import {ReactiveEvents} from '../src/testing/ReactiveEvents'
import {map} from '../src/operators/Map'

const {next, complete} = ReactiveEvents

Expand Down
2 changes: 1 addition & 1 deletion test/test.ScanObservable.ts
Expand Up @@ -3,9 +3,9 @@
*/

import test from 'ava'
import {scan} from '../src/main'
import {TestScheduler} from '../src/testing/TestScheduler'
import {ReactiveEvents} from '../src/testing/ReactiveEvents'
import {scan} from '../src/operators/Scan'

const {next, complete} = ReactiveEvents

Expand Down
2 changes: 1 addition & 1 deletion test/test.SliceObservable.ts
Expand Up @@ -6,8 +6,8 @@

import test from 'ava'
import {TestScheduler} from '../src/testing/TestScheduler'
import {slice} from '../src/main'
import {ReactiveEvents} from '../src/testing/ReactiveEvents'
import {slice} from '../src/operators/Slice'

const {next, complete} = ReactiveEvents
test('takeN(0, 3)', t => {
Expand Down

0 comments on commit 9a52465

Please sign in to comment.