https://github.com/supercll/es3-promise
The Promise realized using ES3 syntax
https://github.com/supercll/es3-promise
es3 javscript promise-api
Last synced: 3 months ago
JSON representation
The Promise realized using ES3 syntax
- Host: GitHub
- URL: https://github.com/supercll/es3-promise
- Owner: supercll
- Created: 2020-10-01T06:53:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T08:18:34.000Z (over 4 years ago)
- Last Synced: 2025-02-07T18:51:35.432Z (4 months ago)
- Topics: es3, javscript, promise-api
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# es3-promise
The Promise realized using ES3 syntax
# 目的
- 理解promise A+ 规范
- 向下兼容老版本浏览器
# 介绍
- 全程使用es3语法
- 实现Prmoise
- Promise.resolve/Promise.reject
- 完整实现Promise.then
- Promise.catch
- Promise.all
- 实现各种兼容处理
# 如何使用
node端和浏览器端皆可使用
只需引入cpromise.js即可```
import "cpromise.js"
or
<script>
or
var {CPromise} = require("cpromise.js")
```
使用方法和原生promise完全一致