Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tohsaka888/interview-code
JS/TS 面试手撕代码题
https://github.com/tohsaka888/interview-code
interview js ts
Last synced: about 2 months ago
JSON representation
JS/TS 面试手撕代码题
- Host: GitHub
- URL: https://github.com/tohsaka888/interview-code
- Owner: tohsaka888
- Created: 2022-12-06T10:48:49.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:38:00.000Z (about 1 year ago)
- Last Synced: 2023-12-15T15:49:45.773Z (about 1 year ago)
- Topics: interview, js, ts
- Language: TypeScript
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JS 面试手撕代码题
## 已完成列表
- [手写节流函数](/throttle/)
- [手写防抖函数](/debounce/)
- [手写`Promise.all`](/Promise.all/)
- [手写`Promise.race`](/Promise.race/)
- [手写`Promise.any`](/Promise.any/)
- [手写`Promise.allSettled`](/Promise.allSettled/)
- [手写浅拷贝](/shallowClone/)
- [手写深拷贝](/deepClone/)
- [手写`instanceof`](/instanceof/)
- [手写`call`](/call/)## TODO
- 手写`apply`
- 手写`bind`## 测试全部用例
```bash
deno test ./
```如果显示类似内容:
```bash
Check file:///home/rin/Documents/interview-code/Promise.all/index.test.ts
Check file:///home/rin/Documents/interview-code/throttle/index.test.ts
running 2 tests from ./Promise.all/index.test.ts
手写Promise.all-JS ... ok (6ms)
手写Promise.all-TS ... ok (5ms)
running 2 tests from ./throttle/index.test.ts
JS节流 ... ok (8ms)
TS节流 ... ok (5ms)ok | 4 passed | 0 failed (57ms)
```则运行成功!
> [`deno`下载文档](https://deno.land/[email protected]/getting_started/installation)