diff --git a/README.md b/README.md index 444ffd1..1bbae71 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ npm install promise-polyfill-plus --save ```javascript import PromisePlus from 'promise-polyfill-plus' // or -const PromisePlus = require('promise-polyfill-plus') +const PromisePlus = require('promise-polyfill-plus').default new PromisePlus((resolve, reject) => { if (true) { @@ -53,7 +53,15 @@ import 'promise-polyfill-plus/auto' require('promise-polyfill-plus/auto') ``` -如果你想 +如果你想直接在 HTML 中使用,请到 Github Releases 页面下载最新版本的 JS 文件,有压缩和未压缩两个版本以供选择。 +下面示例仅供参考,生产环境不建议直接用下载链接。 + +```html + + + + +``` ## 特性 diff --git a/README_EN.md b/README_EN.md index 80afca6..ed05bee 100644 --- a/README_EN.md +++ b/README_EN.md @@ -27,7 +27,7 @@ import to the code directly. ```javascript import PromisePlus from 'promise-polyfill-plus' // or -const PromisePlus = require('promise-polyfill-plus') +const PromisePlus = require('promise-polyfill-plus').default new PromisePlus((resolve, reject) => { if (true) { @@ -53,6 +53,16 @@ import 'promise-polyfill-plus/auto' require('promise-polyfill-plus/auto') ``` +If you want to use it directly in HTML, please go to the Github Releases page to download the latest version of the JS file. There are supplying two versions, compressed and uncompressed. +The following example is for reference only. It is not recommended using the download link directly in the production environment. + +```html + + + + +``` + ## Features - The instance follows the standard of Promise A+, also implements the common but nonstandard catch and finally methods.