Skip to content

Commit

Permalink
refactor(*): utilize rxjs(5.5 and above) lettable operators
Browse files Browse the repository at this point in the history
目的:

 - 更清晰地表达一些读入流、输出流的操作,并帮助进一步提取其中的纯函数;
 - 通过 pipe 方法组合纯函数,令流管理更像搭积木;
 - 令每个模块各自对 rxjs 操作符的依赖更清晰。
  • Loading branch information
chuan6 committed Jan 1, 2018
1 parent c29b8a8 commit 9cb46a3
Show file tree
Hide file tree
Showing 9 changed files with 255 additions and 232 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"npm-run-all": "^4.1.2",
"nyc": "^11.3.0",
"raw-loader": "^0.5.1",
"rxjs": "^5.5.5",
"rxjs": "^5.5.6",
"shelljs": "^0.7.8",
"shx": "^0.2.2",
"sinon": "^4.1.3",
Expand Down
16 changes: 0 additions & 16 deletions src/operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,3 @@ import 'rxjs/add/observable/from'
import 'rxjs/add/observable/fromPromise'
import 'rxjs/add/observable/of'
import 'rxjs/add/observable/throw'

// rxjs Operators
import 'rxjs/add/operator/catch'
import 'rxjs/add/operator/combineAll'
import 'rxjs/add/operator/concatMap'
import 'rxjs/add/operator/concatMapTo'
import 'rxjs/add/operator/debounceTime'
import 'rxjs/add/operator/do'
import 'rxjs/add/operator/map'
import 'rxjs/add/operator/mergeMap'
import 'rxjs/add/operator/publishReplay'
import 'rxjs/add/operator/skip'
import 'rxjs/add/operator/skipWhile'
import 'rxjs/add/operator/switchMap'
import 'rxjs/add/operator/reduce'
import 'rxjs/add/operator/take'
7 changes: 0 additions & 7 deletions src/proxy/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
import 'rxjs/add/operator/combineAll'
import 'rxjs/add/operator/do'
import 'rxjs/add/operator/map'
import 'rxjs/add/operator/publishReplay'
import 'rxjs/add/operator/switchMap'
import 'rxjs/add/operator/take'

export { QueryToken, SelectorMeta } from '../storage/modules/QueryToken'
export { ProxySelector } from '../storage/modules/ProxySelector'
export * from '../interface'
Loading

0 comments on commit 9cb46a3

Please sign in to comment.