1 Star 0 Fork 2

hokhyk / learning-rxjs

forked from 燕云长风 / learn-rxjs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

English | 简体中文

介绍

你好,我是徐晓东,笔名燕云长风。大漠穷秋于 2019-03-16 21:22 赠此笔名。
寓意:结合李白著名的边塞诗《关山月》取【燕云长风】—— 长风几万里,吹度玉门关。

RXJS讲解演示

创建类操作符

  1. formEvent
  2. from
  3. of
  4. interval
  5. timer
  6. never
  7. throwError
  8. empty
  9. range
  10. defer
  11. generate
  12. create
  13. ajax
  14. fromEventPattern

工具类操作符

  1. tap
  2. delay
  3. delayWhen
  4. dematerialize
  5. materialize
  6. timeInterval
  7. timeout
  8. timeoutWith
  9. timestamp

过滤类操作符

  1. debounceTime
  2. debounce
  3. distinct
  4. distinctUntilChanged
  5. distinctUntilKeyChanged
  6. filter
  7. reduce
  8. scan
  9. take
  10. takeUtil
  11. first
  12. last
  13. throttle
  14. throttleTime
  15. audit
  16. auditTime
  17. sample
  18. sampleTime
  19. single
  20. skipLast
  21. elementAt
  22. ignore-elements
  23. skipUntil
  24. takeWhile
  25. skipWhile
  26. min
  27. max

转换类的操作符

  1. map
  2. mapTo
  3. concatMap
  4. concatMapTo
  5. pluck
  6. buffer
  7. bufferCount
  8. bufferTime
  9. bufferToggle
  10. bufferWhen
  11. exhaustMap
  12. exhaust
  13. expand
  14. groupBy
  15. pairwise
  16. partition
  17. window
  18. windowCount
  19. windowToggle
  20. windowWhen
  21. windowTime
  22. repeat
  23. repeatWhen
  24. toArray

合并类的操作符

  1. combineLatest
  2. concat
  3. merge
  4. startWith
  5. zip
  6. withLatestFrom
  7. race
  8. combineAll
  9. concatAll
  10. endWith
  11. forkJoin

条件类的操作符

  1. defaultIfEmpty
  2. iif
  3. find
  4. findIndex
  5. count
  6. every
  7. squenceEqual

高阶操作符

  1. mergeMap
  2. switchMap
  3. mergeMapTo
  4. mergeScan
  5. mergeAll

多播操作符

  1. multicast
  2. share
  3. shareReplay
  4. publish

Subject Class

  1. Subject
  2. BehaviorSubject
  3. ReplaySubject
  4. AsyncSubject

自定义操作符

  1. takeEveryNth

Observable Custom

  1. Observable

Jest Unit 测试

安装

   npm install --save-dev jest typescript ts-jest @types/jest  or yarn add --dev jest typescript ts-jest @types/jest

创建测试ts类型的配置文件 jest config file

   npx ts-jest config:init or  yarn ts-jest config:init

具体配置参数文档 请参照官网:

运行unit测试

npm t  or yarn test

cypress e2e 测试

安装

  npm install cypress --save-dev or  yarn add cypress --dev

打开cypress 测试

   npx cypress open  or  yarn run cypress open

添加 npm script in package.json

{
  "scripts": {
    "cypress:open": "cypress open"
  }
}

typescript文件测试,需在cypress 目录文件夹下创建tsconfig.json

{
  "compilerOptions": {
    "strict": true,
    "baseUrl": "../node_modules",
    "target": "es5",
    "lib": ["es5", "dom"],
    "types": ["cypress"]
  },
  "include": [
    "**/*.ts"
  ]
}

创建测试文件需要在cypress/integration 文件夹下创建

   touch {your_project}/cypress/integration/sample_spec.(j|t)s

运行e2e测试,选择指定文件进行测试

    npm run cypress:open

我的个人博客

我参与的系列项目

  1. NiceFish:美人鱼,这是一个微型Blog系统,前端基于Angular7.0 + PrimeNG7.1.0。(GVIP 码云最有价值的开源项目 3207 ☆)
  2. NiceFish-React:这是React版的实现,和 NiceFish Angular 版本保持风格一致。采用React Hooks 16.8.3 版本,使用TypeScript、Ant Design组件库以及Bootstrap v4.2.1 开发。 (7 ☆)
  3. OpenWMS-Frontend:OpenWMS项目前端基于 Angular 7.0 + PrimeNG 7.1.0。 (已推荐 201 ☆)
  4. nicefish-spring-cloud:这是NiceFish的服务端代码,基于SpringCloud。已经完成了一些基本的功能,如 SpringSecurity+OAuth2+JWT 实现SSO,文章、用户、评论等的分页查询等。如果你需要与这个后端代码进行对接,请检出本项目的 for-spring-cloud 分支。 (已推荐 118 ☆)

我的社交主页

  1. 燕云长风知乎
  2. 燕云长风知乎专栏
  3. 燕云长风github
  4. 燕云长风gitee
  5. 燕云长风twitter
  6. 燕云长风medium
  7. 燕云长风facebook
  8. 燕云长风stackoverflow
  9. 燕云长风npm
  10. 燕云长风linkedin
  11. 燕云长风youtube
  12. 燕云长风gmail

开源许可证

MIT

空文件

简介

this is RxJs 展开 收起
TypeScript
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/hokhyk/learning-rxjs.git
git@gitee.com:hokhyk/learning-rxjs.git
hokhyk
learning-rxjs
learning-rxjs
master

搜索帮助