├── .github └── workflows │ ├── build.yml │ └── deploy.yml ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── polyfills.js └── spec.html /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build spec 2 | 3 | on: pull_request 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v2 11 | - uses: actions/setup-node@v3 12 | with: 13 | node-version: 16 14 | - run: npm install 15 | - run: npm run build 16 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy gh-pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | - uses: actions/setup-node@v3 15 | with: 16 | node-version: 16 17 | - run: npm install 18 | - run: npm run build 19 | - uses: JamesIves/github-pages-deploy-action@v4.3.3 20 | with: 21 | branch: gh-pages 22 | folder: docs 23 | clean: true 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | docs 2 | node_modules 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `Promise.withResolvers` 2 | 3 | Note: this proposal is now [at stage 4](https://github.com/tc39/proposals/commit/8fef293ac43c2ae15b4209ce1fec6347c9a0a583). See the spec PR here: https://github.com/tc39/ecma262/pull/3179 4 | 5 | ## Status 6 | 7 | Stage: 4 8 | 9 | Champions: 10 | 11 | - Peter Klecha ([@peetklecha](https://github.com/peetklecha)) 12 | 13 | Authors: 14 | 15 | - Peter Klecha ([@peetklecha](https://github.com/peetklecha)) 16 | 17 | [Stage 3 slides](https://docs.google.com/presentation/d/1KFShqHVFhVBaqZ3anheUGOwtVDrPWCVeFvmaUpwk3AQ) 18 | [Stage 2 slides](https://docs.google.com/presentation/d/1CEh2xgW-KB0Tpz2GQtcJ8nDbWq99d3y8NCwYJw-laSI) 19 | [Stage 1 slides](https://docs.google.com/presentation/d/18CqQc6GfZJBWmT7li2nqfvrSFhpNwtQWPfSXhAwo-Bo) 20 | 21 | ## Synopsis 22 | 23 | When hand-rolling a Promise, the user must pass an executor callback which takes two arguments: a resolve function, which triggers resolution of the promise, and a reject function, which triggers rejection. This works well if the callback can embed a call to an asynchronous function which will eventually trigger the resolution or rejection, e.g., the registration of an event listener. 24 | 25 | ```js 26 | const promise = new Promise((resolve, reject) => { 27 | asyncRequest(config, response => { 28 | const buffer = []; 29 | response.on('data', data => buffer.push(data)); 30 | response.on('end', () => resolve(buffer)); 31 | response.on('error', reason => reject(reason)); 32 | }); 33 | }); 34 | ``` 35 | 36 | Often however developers would like to configure the promise's resolution and rejection behavior after instantiating it. Today this requires a cumbersome workaround to extract the resolve and reject functions from the callback scope: 37 | 38 | ```js 39 | let resolve, reject; 40 | const promise = new Promise((res, rej) => { 41 | resolve = res; 42 | reject = rej; 43 | }); 44 | asyncRequest(config, response => { 45 | const buffer = []; 46 | response.on('callback-request', id => { 47 | promise.then(data => callback(id, data)); 48 | }); 49 | response.on('data', data => buffer.push(data)); 50 | response.on('end', () => resolve(buffer)); 51 | response.on('error', reason => reject(reason)); 52 | }); 53 | ``` 54 | 55 | Developers may also have requirements that necessitate passing resolve/reject to more than one caller, so they MUST implement it this way: 56 | 57 | ```js 58 | let resolve = () => { }; 59 | let reject = () => { }; 60 | 61 | function request(type, message) { 62 | if (socket) { 63 | const promise = new Promise((res, rej) => { 64 | resolve = res; 65 | reject = rej; 66 | }); 67 | socket.emit(type, message); 68 | return promise; 69 | } 70 | 71 | return Promise.reject(new Error('Socket unavailable')); 72 | } 73 | 74 | socket.on('response', response => { 75 | if (response.status === 200) { 76 | resolve(response); 77 | } 78 | else { 79 | reject(new Error(response)); 80 | } 81 | }); 82 | 83 | socket.on('error', err => { 84 | reject(err); 85 | }); 86 | ``` 87 | 88 | This is boilerplate code that is very frequently re-written by developers. This proposal simply seeks to add a static method, tentatively called `withResolvers`, to the `Promise` constructor which returns a promise along with its resolution and rejection functions conveniently exposed. 89 | 90 | ```js 91 | const { promise, resolve, reject } = Promise.withResolvers(); 92 | ``` 93 | 94 | This method or something like it may be known to some committee members under the name `defer` or `deferred`, names also sometimes applied to utility functions in the ecosystem. This proposal adopts a more descriptive name for the benefit of users who may not be familiar with those historical functions. 95 | 96 | ## Existing implementations 97 | 98 | Libraries and applications continually re-invent this wheel. Below are just a handful of examples. 99 | 100 | |Library|Example| 101 | |------------|----------| 102 | |React|[inline example](https://github.com/facebook/react/blob/d9e0485c84b45055ba86629dc20870faca9b5973/packages/react-dom/src/__tests__/ReactDOMFizzStaticBrowser-test.js#L95) 103 | |Vue | [inline example](https://github.com/vuejs/core/blob/9c304bfe7942a20264235865b4bb5f6e53fdee0d/packages/runtime-core/src/compat/componentAsync.ts#L32) 104 | |Axios|[inline example](https://github.com/axios/axios/blob/bdf493cf8b84eb3e3440e72d5725ba0f138e0451/lib/cancel/CancelToken.js#L20) 105 | |TypeScript|[utility](https://github.com/microsoft/TypeScript/blob/1d96eb489e559f4f61522edb3c8b5987bbe948af/src/harness/util.ts#L121) 106 | |Vite|[inline example](https://github.com/vitejs/vite/blob/134ce6817984bad0f5fb043481502531fee9b1db/playground/test-utils.ts#L225) 107 | |Deno stdlib | [utility](https://deno.land/std@0.178.0/async/deferred.ts?source) 108 | 109 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "proposal-promise-with-resolvers", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/code-frame": { 8 | "version": "7.12.11", 9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", 10 | "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", 11 | "requires": { 12 | "@babel/highlight": "^7.10.4" 13 | } 14 | }, 15 | "@babel/helper-validator-identifier": { 16 | "version": "7.19.1", 17 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", 18 | "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==" 19 | }, 20 | "@babel/highlight": { 21 | "version": "7.18.6", 22 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", 23 | "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", 24 | "requires": { 25 | "@babel/helper-validator-identifier": "^7.18.6", 26 | "chalk": "^2.0.0", 27 | "js-tokens": "^4.0.0" 28 | }, 29 | "dependencies": { 30 | "ansi-styles": { 31 | "version": "3.2.1", 32 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 33 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 34 | "requires": { 35 | "color-convert": "^1.9.0" 36 | } 37 | }, 38 | "chalk": { 39 | "version": "2.4.2", 40 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 41 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 42 | "requires": { 43 | "ansi-styles": "^3.2.1", 44 | "escape-string-regexp": "^1.0.5", 45 | "supports-color": "^5.3.0" 46 | } 47 | }, 48 | "color-convert": { 49 | "version": "1.9.3", 50 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 51 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 52 | "requires": { 53 | "color-name": "1.1.3" 54 | } 55 | }, 56 | "color-name": { 57 | "version": "1.1.3", 58 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 59 | "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" 60 | }, 61 | "has-flag": { 62 | "version": "3.0.0", 63 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 64 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" 65 | }, 66 | "supports-color": { 67 | "version": "5.5.0", 68 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 69 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 70 | "requires": { 71 | "has-flag": "^3.0.0" 72 | } 73 | } 74 | } 75 | }, 76 | "@esfx/async-canceltoken": { 77 | "version": "1.0.0", 78 | "resolved": "https://registry.npmjs.org/@esfx/async-canceltoken/-/async-canceltoken-1.0.0.tgz", 79 | "integrity": "sha512-3Ps/4NPd7qFltmHL+CYXCjZtNXcQGV9BZmpzu8Rt3/0SZMtbQve0gtX0uJDJGvAWa6w3IB4HrKVP12VPoFONmA==", 80 | "requires": { 81 | "@esfx/cancelable": "^1.0.0", 82 | "@esfx/canceltoken": "^1.0.0", 83 | "@esfx/disposable": "^1.0.0", 84 | "tslib": "^2.4.0" 85 | } 86 | }, 87 | "@esfx/cancelable": { 88 | "version": "1.0.0", 89 | "resolved": "https://registry.npmjs.org/@esfx/cancelable/-/cancelable-1.0.0.tgz", 90 | "integrity": "sha512-2dry/TuOT9ydpw86f396v09cyi/gLeGPIZSH4Gx+V/qKQaS/OXCRurCY+Cn8zkBfTAgFsjk9NE15d+LPo2kt9A==", 91 | "requires": { 92 | "@esfx/disposable": "^1.0.0" 93 | } 94 | }, 95 | "@esfx/canceltoken": { 96 | "version": "1.0.0", 97 | "resolved": "https://registry.npmjs.org/@esfx/canceltoken/-/canceltoken-1.0.0.tgz", 98 | "integrity": "sha512-/TgdzC5O89w5v0TgwE2wcdtampWNAFOxzurCtb4RxYVr3m72yk3Bg82vMdznx+H9nnf28zVDR0PtpZO9FxmOkw==", 99 | "requires": { 100 | "@esfx/cancelable": "^1.0.0", 101 | "@esfx/disposable": "^1.0.0", 102 | "tslib": "^2.4.0" 103 | } 104 | }, 105 | "@esfx/disposable": { 106 | "version": "1.0.0", 107 | "resolved": "https://registry.npmjs.org/@esfx/disposable/-/disposable-1.0.0.tgz", 108 | "integrity": "sha512-hu7EI+YxlEWEKrb2himbS13HNaq5mlUePASf99KeQqkiNeqiAZbKqG4w59uDcLZs8JrV3qJqS/NYib5ZMhbfTQ==" 109 | }, 110 | "@nodelib/fs.scandir": { 111 | "version": "2.1.5", 112 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", 113 | "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", 114 | "requires": { 115 | "@nodelib/fs.stat": "2.0.5", 116 | "run-parallel": "^1.1.9" 117 | } 118 | }, 119 | "@nodelib/fs.stat": { 120 | "version": "2.0.5", 121 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", 122 | "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" 123 | }, 124 | "@nodelib/fs.walk": { 125 | "version": "1.2.8", 126 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", 127 | "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", 128 | "requires": { 129 | "@nodelib/fs.scandir": "2.1.5", 130 | "fastq": "^1.6.0" 131 | } 132 | }, 133 | "@tc39/ecma262-biblio": { 134 | "version": "2.1.2558", 135 | "resolved": "https://registry.npmjs.org/@tc39/ecma262-biblio/-/ecma262-biblio-2.1.2558.tgz", 136 | "integrity": "sha512-InIZSo2BR5WCHTiJ4ZHBa9RalKlzwAsu9cICqiGsM/Z17mFVHlB/VRj1VIR1CQ9qFrfkGktwIKqzw+P8TT4mBA==" 137 | }, 138 | "@tootallnate/once": { 139 | "version": "2.0.0", 140 | "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", 141 | "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" 142 | }, 143 | "abab": { 144 | "version": "2.0.6", 145 | "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", 146 | "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==" 147 | }, 148 | "acorn": { 149 | "version": "8.8.2", 150 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", 151 | "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==" 152 | }, 153 | "acorn-globals": { 154 | "version": "6.0.0", 155 | "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", 156 | "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", 157 | "requires": { 158 | "acorn": "^7.1.1", 159 | "acorn-walk": "^7.1.1" 160 | }, 161 | "dependencies": { 162 | "acorn": { 163 | "version": "7.4.1", 164 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", 165 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" 166 | } 167 | } 168 | }, 169 | "acorn-walk": { 170 | "version": "7.2.0", 171 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", 172 | "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==" 173 | }, 174 | "agent-base": { 175 | "version": "6.0.2", 176 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 177 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 178 | "requires": { 179 | "debug": "4" 180 | } 181 | }, 182 | "ansi-styles": { 183 | "version": "4.3.0", 184 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 185 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 186 | "requires": { 187 | "color-convert": "^2.0.1" 188 | } 189 | }, 190 | "argparse": { 191 | "version": "1.0.10", 192 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 193 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 194 | "requires": { 195 | "sprintf-js": "~1.0.2" 196 | } 197 | }, 198 | "array-back": { 199 | "version": "3.1.0", 200 | "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", 201 | "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==" 202 | }, 203 | "asynckit": { 204 | "version": "0.4.0", 205 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 206 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 207 | }, 208 | "braces": { 209 | "version": "3.0.2", 210 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 211 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 212 | "requires": { 213 | "fill-range": "^7.0.1" 214 | } 215 | }, 216 | "browser-process-hrtime": { 217 | "version": "1.0.0", 218 | "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", 219 | "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" 220 | }, 221 | "chalk": { 222 | "version": "4.1.2", 223 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 224 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 225 | "requires": { 226 | "ansi-styles": "^4.1.0", 227 | "supports-color": "^7.1.0" 228 | } 229 | }, 230 | "color-convert": { 231 | "version": "2.0.1", 232 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 233 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 234 | "requires": { 235 | "color-name": "~1.1.4" 236 | } 237 | }, 238 | "color-name": { 239 | "version": "1.1.4", 240 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 241 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 242 | }, 243 | "combined-stream": { 244 | "version": "1.0.8", 245 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 246 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 247 | "requires": { 248 | "delayed-stream": "~1.0.0" 249 | } 250 | }, 251 | "command-line-args": { 252 | "version": "5.2.1", 253 | "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", 254 | "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", 255 | "requires": { 256 | "array-back": "^3.1.0", 257 | "find-replace": "^3.0.0", 258 | "lodash.camelcase": "^4.3.0", 259 | "typical": "^4.0.0" 260 | } 261 | }, 262 | "command-line-usage": { 263 | "version": "6.1.3", 264 | "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", 265 | "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", 266 | "requires": { 267 | "array-back": "^4.0.2", 268 | "chalk": "^2.4.2", 269 | "table-layout": "^1.0.2", 270 | "typical": "^5.2.0" 271 | }, 272 | "dependencies": { 273 | "ansi-styles": { 274 | "version": "3.2.1", 275 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 276 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 277 | "requires": { 278 | "color-convert": "^1.9.0" 279 | } 280 | }, 281 | "array-back": { 282 | "version": "4.0.2", 283 | "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", 284 | "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==" 285 | }, 286 | "chalk": { 287 | "version": "2.4.2", 288 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 289 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 290 | "requires": { 291 | "ansi-styles": "^3.2.1", 292 | "escape-string-regexp": "^1.0.5", 293 | "supports-color": "^5.3.0" 294 | } 295 | }, 296 | "color-convert": { 297 | "version": "1.9.3", 298 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 299 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 300 | "requires": { 301 | "color-name": "1.1.3" 302 | } 303 | }, 304 | "color-name": { 305 | "version": "1.1.3", 306 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 307 | "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" 308 | }, 309 | "has-flag": { 310 | "version": "3.0.0", 311 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 312 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" 313 | }, 314 | "supports-color": { 315 | "version": "5.5.0", 316 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 317 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 318 | "requires": { 319 | "has-flag": "^3.0.0" 320 | } 321 | }, 322 | "typical": { 323 | "version": "5.2.0", 324 | "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", 325 | "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==" 326 | } 327 | } 328 | }, 329 | "cssom": { 330 | "version": "0.5.0", 331 | "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", 332 | "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==" 333 | }, 334 | "cssstyle": { 335 | "version": "2.3.0", 336 | "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", 337 | "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", 338 | "requires": { 339 | "cssom": "~0.3.6" 340 | }, 341 | "dependencies": { 342 | "cssom": { 343 | "version": "0.3.8", 344 | "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", 345 | "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" 346 | } 347 | } 348 | }, 349 | "data-urls": { 350 | "version": "3.0.2", 351 | "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", 352 | "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", 353 | "requires": { 354 | "abab": "^2.0.6", 355 | "whatwg-mimetype": "^3.0.0", 356 | "whatwg-url": "^11.0.0" 357 | }, 358 | "dependencies": { 359 | "whatwg-url": { 360 | "version": "11.0.0", 361 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 362 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 363 | "requires": { 364 | "tr46": "^3.0.0", 365 | "webidl-conversions": "^7.0.0" 366 | } 367 | } 368 | } 369 | }, 370 | "debug": { 371 | "version": "4.3.4", 372 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 373 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 374 | "requires": { 375 | "ms": "2.1.2" 376 | } 377 | }, 378 | "decimal.js": { 379 | "version": "10.4.3", 380 | "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", 381 | "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" 382 | }, 383 | "dedent-js": { 384 | "version": "1.0.1", 385 | "resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz", 386 | "integrity": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==" 387 | }, 388 | "deep-extend": { 389 | "version": "0.6.0", 390 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 391 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" 392 | }, 393 | "deep-is": { 394 | "version": "0.1.4", 395 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", 396 | "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" 397 | }, 398 | "delayed-stream": { 399 | "version": "1.0.0", 400 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 401 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" 402 | }, 403 | "domexception": { 404 | "version": "4.0.0", 405 | "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", 406 | "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", 407 | "requires": { 408 | "webidl-conversions": "^7.0.0" 409 | } 410 | }, 411 | "ecmarkdown": { 412 | "version": "8.1.0", 413 | "resolved": "https://registry.npmjs.org/ecmarkdown/-/ecmarkdown-8.1.0.tgz", 414 | "integrity": "sha512-dx6cM6RFjzAXkWr2KQRikED4gy70NFQ0vTI4XUQM/LWcjUYRJUbGdd7nd++trXi5az1JSe49TeeCIVMKDXOtcQ==", 415 | "requires": { 416 | "escape-html": "^1.0.1" 417 | } 418 | }, 419 | "ecmarkup": { 420 | "version": "17.0.0", 421 | "resolved": "https://registry.npmjs.org/ecmarkup/-/ecmarkup-17.0.0.tgz", 422 | "integrity": "sha512-eQr9Vn9IPIH3rrbYEGPqfAwDJ9pg1zrOSZXc8HQwVMQ9d5tb+BsoPeKw5W1SinL09yZalcbLyqnX7rC393VRdA==", 423 | "requires": { 424 | "chalk": "^4.1.2", 425 | "command-line-args": "^5.2.0", 426 | "command-line-usage": "^6.1.1", 427 | "dedent-js": "^1.0.1", 428 | "ecmarkdown": "^8.1.0", 429 | "eslint-formatter-codeframe": "^7.32.1", 430 | "fast-glob": "^3.2.7", 431 | "grammarkdown": "^3.2.0", 432 | "highlight.js": "11.0.1", 433 | "html-escape": "^1.0.2", 434 | "js-yaml": "^3.13.1", 435 | "jsdom": "^19.0.0", 436 | "nwsapi": "2.2.0", 437 | "parse5": "^6.0.1", 438 | "prex": "^0.4.7", 439 | "promise-debounce": "^1.0.1" 440 | } 441 | }, 442 | "escape-html": { 443 | "version": "1.0.3", 444 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 445 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 446 | }, 447 | "escape-string-regexp": { 448 | "version": "1.0.5", 449 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 450 | "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" 451 | }, 452 | "escodegen": { 453 | "version": "2.0.0", 454 | "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", 455 | "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", 456 | "requires": { 457 | "esprima": "^4.0.1", 458 | "estraverse": "^5.2.0", 459 | "esutils": "^2.0.2", 460 | "optionator": "^0.8.1", 461 | "source-map": "~0.6.1" 462 | } 463 | }, 464 | "eslint-formatter-codeframe": { 465 | "version": "7.32.1", 466 | "resolved": "https://registry.npmjs.org/eslint-formatter-codeframe/-/eslint-formatter-codeframe-7.32.1.tgz", 467 | "integrity": "sha512-DK/3Q3+zVKq/7PdSYiCxPrsDF8H/TRMK5n8Hziwr4IMkMy+XiKSwbpj25AdajS63I/B61Snetq4uVvX9fOLyAg==", 468 | "requires": { 469 | "@babel/code-frame": "7.12.11", 470 | "chalk": "^4.0.0" 471 | } 472 | }, 473 | "esprima": { 474 | "version": "4.0.1", 475 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 476 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" 477 | }, 478 | "estraverse": { 479 | "version": "5.3.0", 480 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", 481 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" 482 | }, 483 | "esutils": { 484 | "version": "2.0.3", 485 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 486 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" 487 | }, 488 | "fast-glob": { 489 | "version": "3.2.12", 490 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", 491 | "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", 492 | "requires": { 493 | "@nodelib/fs.stat": "^2.0.2", 494 | "@nodelib/fs.walk": "^1.2.3", 495 | "glob-parent": "^5.1.2", 496 | "merge2": "^1.3.0", 497 | "micromatch": "^4.0.4" 498 | } 499 | }, 500 | "fast-levenshtein": { 501 | "version": "2.0.6", 502 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 503 | "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" 504 | }, 505 | "fastq": { 506 | "version": "1.15.0", 507 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", 508 | "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", 509 | "requires": { 510 | "reusify": "^1.0.4" 511 | } 512 | }, 513 | "fill-range": { 514 | "version": "7.0.1", 515 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 516 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 517 | "requires": { 518 | "to-regex-range": "^5.0.1" 519 | } 520 | }, 521 | "find-replace": { 522 | "version": "3.0.0", 523 | "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", 524 | "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", 525 | "requires": { 526 | "array-back": "^3.0.1" 527 | } 528 | }, 529 | "form-data": { 530 | "version": "4.0.0", 531 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 532 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 533 | "requires": { 534 | "asynckit": "^0.4.0", 535 | "combined-stream": "^1.0.8", 536 | "mime-types": "^2.1.12" 537 | } 538 | }, 539 | "glob-parent": { 540 | "version": "5.1.2", 541 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 542 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 543 | "requires": { 544 | "is-glob": "^4.0.1" 545 | } 546 | }, 547 | "grammarkdown": { 548 | "version": "3.2.0", 549 | "resolved": "https://registry.npmjs.org/grammarkdown/-/grammarkdown-3.2.0.tgz", 550 | "integrity": "sha512-pEVUvG2Kxv/PwM3Dm3kFEU1/GHRkNcFWmk/zkqN/y0uoQtPaZ+5VaBacMQAaFOIL9WGYjHXtqpkT5YRvySsISQ==", 551 | "requires": { 552 | "@esfx/async-canceltoken": "^1.0.0-pre.13", 553 | "@esfx/cancelable": "^1.0.0-pre.13" 554 | } 555 | }, 556 | "has-flag": { 557 | "version": "4.0.0", 558 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 559 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 560 | }, 561 | "highlight.js": { 562 | "version": "11.0.1", 563 | "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.0.1.tgz", 564 | "integrity": "sha512-EqYpWyTF2s8nMfttfBA2yLKPNoZCO33pLS4MnbXQ4hECf1TKujCt1Kq7QAdrio7roL4+CqsfjqwYj4tYgq0pJQ==" 565 | }, 566 | "html-encoding-sniffer": { 567 | "version": "3.0.0", 568 | "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", 569 | "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", 570 | "requires": { 571 | "whatwg-encoding": "^2.0.0" 572 | } 573 | }, 574 | "html-escape": { 575 | "version": "1.0.2", 576 | "resolved": "https://registry.npmjs.org/html-escape/-/html-escape-1.0.2.tgz", 577 | "integrity": "sha512-r4cqVc7QAX1/jpPsW9OJNsTTtFhcf+ZBqoA3rWOddMg/y+n6ElKfz+IGKbvV2RTeECDzyrQXa2rpo3IFFrANWg==" 578 | }, 579 | "http-proxy-agent": { 580 | "version": "5.0.0", 581 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", 582 | "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", 583 | "requires": { 584 | "@tootallnate/once": "2", 585 | "agent-base": "6", 586 | "debug": "4" 587 | } 588 | }, 589 | "https-proxy-agent": { 590 | "version": "5.0.1", 591 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", 592 | "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", 593 | "requires": { 594 | "agent-base": "6", 595 | "debug": "4" 596 | } 597 | }, 598 | "iconv-lite": { 599 | "version": "0.6.3", 600 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", 601 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", 602 | "requires": { 603 | "safer-buffer": ">= 2.1.2 < 3.0.0" 604 | } 605 | }, 606 | "is-extglob": { 607 | "version": "2.1.1", 608 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 609 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" 610 | }, 611 | "is-glob": { 612 | "version": "4.0.3", 613 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 614 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 615 | "requires": { 616 | "is-extglob": "^2.1.1" 617 | } 618 | }, 619 | "is-number": { 620 | "version": "7.0.0", 621 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 622 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" 623 | }, 624 | "is-potential-custom-element-name": { 625 | "version": "1.0.1", 626 | "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", 627 | "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" 628 | }, 629 | "js-tokens": { 630 | "version": "4.0.0", 631 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 632 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" 633 | }, 634 | "js-yaml": { 635 | "version": "3.14.1", 636 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 637 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 638 | "requires": { 639 | "argparse": "^1.0.7", 640 | "esprima": "^4.0.0" 641 | } 642 | }, 643 | "jsdom": { 644 | "version": "19.0.0", 645 | "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", 646 | "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", 647 | "requires": { 648 | "abab": "^2.0.5", 649 | "acorn": "^8.5.0", 650 | "acorn-globals": "^6.0.0", 651 | "cssom": "^0.5.0", 652 | "cssstyle": "^2.3.0", 653 | "data-urls": "^3.0.1", 654 | "decimal.js": "^10.3.1", 655 | "domexception": "^4.0.0", 656 | "escodegen": "^2.0.0", 657 | "form-data": "^4.0.0", 658 | "html-encoding-sniffer": "^3.0.0", 659 | "http-proxy-agent": "^5.0.0", 660 | "https-proxy-agent": "^5.0.0", 661 | "is-potential-custom-element-name": "^1.0.1", 662 | "nwsapi": "^2.2.0", 663 | "parse5": "6.0.1", 664 | "saxes": "^5.0.1", 665 | "symbol-tree": "^3.2.4", 666 | "tough-cookie": "^4.0.0", 667 | "w3c-hr-time": "^1.0.2", 668 | "w3c-xmlserializer": "^3.0.0", 669 | "webidl-conversions": "^7.0.0", 670 | "whatwg-encoding": "^2.0.0", 671 | "whatwg-mimetype": "^3.0.0", 672 | "whatwg-url": "^10.0.0", 673 | "ws": "^8.2.3", 674 | "xml-name-validator": "^4.0.0" 675 | } 676 | }, 677 | "levn": { 678 | "version": "0.3.0", 679 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 680 | "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", 681 | "requires": { 682 | "prelude-ls": "~1.1.2", 683 | "type-check": "~0.3.2" 684 | } 685 | }, 686 | "lodash.camelcase": { 687 | "version": "4.3.0", 688 | "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", 689 | "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" 690 | }, 691 | "merge2": { 692 | "version": "1.4.1", 693 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", 694 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" 695 | }, 696 | "micromatch": { 697 | "version": "4.0.5", 698 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", 699 | "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", 700 | "requires": { 701 | "braces": "^3.0.2", 702 | "picomatch": "^2.3.1" 703 | } 704 | }, 705 | "mime-db": { 706 | "version": "1.52.0", 707 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 708 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 709 | }, 710 | "mime-types": { 711 | "version": "2.1.35", 712 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 713 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 714 | "requires": { 715 | "mime-db": "1.52.0" 716 | } 717 | }, 718 | "ms": { 719 | "version": "2.1.2", 720 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 721 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 722 | }, 723 | "nwsapi": { 724 | "version": "2.2.0", 725 | "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", 726 | "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==" 727 | }, 728 | "optionator": { 729 | "version": "0.8.3", 730 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", 731 | "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", 732 | "requires": { 733 | "deep-is": "~0.1.3", 734 | "fast-levenshtein": "~2.0.6", 735 | "levn": "~0.3.0", 736 | "prelude-ls": "~1.1.2", 737 | "type-check": "~0.3.2", 738 | "word-wrap": "~1.2.3" 739 | } 740 | }, 741 | "parse5": { 742 | "version": "6.0.1", 743 | "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", 744 | "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" 745 | }, 746 | "picomatch": { 747 | "version": "2.3.1", 748 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 749 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" 750 | }, 751 | "prelude-ls": { 752 | "version": "1.1.2", 753 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 754 | "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==" 755 | }, 756 | "prex": { 757 | "version": "0.4.9", 758 | "resolved": "https://registry.npmjs.org/prex/-/prex-0.4.9.tgz", 759 | "integrity": "sha512-pQCB9AH8MXQRBaelDkhnTkqY6GRiXt1xWlx2hBReZYZwVA0m7EQcnF/K55zr87cCADDHmdD+qq7G6a8Pu+BRFA==", 760 | "requires": { 761 | "@esfx/cancelable": "^1.0.0 || >=1.0.0-pre.13", 762 | "@esfx/disposable": "^1.0.0 || >=1.0.0-pre.13" 763 | } 764 | }, 765 | "promise-debounce": { 766 | "version": "1.0.1", 767 | "resolved": "https://registry.npmjs.org/promise-debounce/-/promise-debounce-1.0.1.tgz", 768 | "integrity": "sha512-jq3Crngf1DaaOXQIOUkPr7LsW4UsWyn0KW1MJ+yMn5njTJ+F1AuHmjjwJhod9HuoNSSMspSLS9PS3V7BrexwjQ==" 769 | }, 770 | "psl": { 771 | "version": "1.9.0", 772 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", 773 | "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" 774 | }, 775 | "punycode": { 776 | "version": "2.3.0", 777 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", 778 | "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" 779 | }, 780 | "querystringify": { 781 | "version": "2.2.0", 782 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", 783 | "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" 784 | }, 785 | "queue-microtask": { 786 | "version": "1.2.3", 787 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", 788 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" 789 | }, 790 | "reduce-flatten": { 791 | "version": "2.0.0", 792 | "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", 793 | "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==" 794 | }, 795 | "requires-port": { 796 | "version": "1.0.0", 797 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 798 | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" 799 | }, 800 | "reusify": { 801 | "version": "1.0.4", 802 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 803 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" 804 | }, 805 | "run-parallel": { 806 | "version": "1.2.0", 807 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", 808 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 809 | "requires": { 810 | "queue-microtask": "^1.2.2" 811 | } 812 | }, 813 | "safer-buffer": { 814 | "version": "2.1.2", 815 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 816 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 817 | }, 818 | "saxes": { 819 | "version": "5.0.1", 820 | "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", 821 | "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", 822 | "requires": { 823 | "xmlchars": "^2.2.0" 824 | } 825 | }, 826 | "source-map": { 827 | "version": "0.6.1", 828 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 829 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 830 | "optional": true 831 | }, 832 | "sprintf-js": { 833 | "version": "1.0.3", 834 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 835 | "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" 836 | }, 837 | "supports-color": { 838 | "version": "7.2.0", 839 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 840 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 841 | "requires": { 842 | "has-flag": "^4.0.0" 843 | } 844 | }, 845 | "symbol-tree": { 846 | "version": "3.2.4", 847 | "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", 848 | "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" 849 | }, 850 | "table-layout": { 851 | "version": "1.0.2", 852 | "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", 853 | "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", 854 | "requires": { 855 | "array-back": "^4.0.1", 856 | "deep-extend": "~0.6.0", 857 | "typical": "^5.2.0", 858 | "wordwrapjs": "^4.0.0" 859 | }, 860 | "dependencies": { 861 | "array-back": { 862 | "version": "4.0.2", 863 | "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", 864 | "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==" 865 | }, 866 | "typical": { 867 | "version": "5.2.0", 868 | "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", 869 | "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==" 870 | } 871 | } 872 | }, 873 | "to-regex-range": { 874 | "version": "5.0.1", 875 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 876 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 877 | "requires": { 878 | "is-number": "^7.0.0" 879 | } 880 | }, 881 | "tough-cookie": { 882 | "version": "4.1.2", 883 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", 884 | "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", 885 | "requires": { 886 | "psl": "^1.1.33", 887 | "punycode": "^2.1.1", 888 | "universalify": "^0.2.0", 889 | "url-parse": "^1.5.3" 890 | } 891 | }, 892 | "tr46": { 893 | "version": "3.0.0", 894 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 895 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 896 | "requires": { 897 | "punycode": "^2.1.1" 898 | } 899 | }, 900 | "tslib": { 901 | "version": "2.5.0", 902 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", 903 | "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" 904 | }, 905 | "type-check": { 906 | "version": "0.3.2", 907 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 908 | "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", 909 | "requires": { 910 | "prelude-ls": "~1.1.2" 911 | } 912 | }, 913 | "typical": { 914 | "version": "4.0.0", 915 | "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", 916 | "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==" 917 | }, 918 | "universalify": { 919 | "version": "0.2.0", 920 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", 921 | "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" 922 | }, 923 | "url-parse": { 924 | "version": "1.5.10", 925 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", 926 | "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", 927 | "requires": { 928 | "querystringify": "^2.1.1", 929 | "requires-port": "^1.0.0" 930 | } 931 | }, 932 | "w3c-hr-time": { 933 | "version": "1.0.2", 934 | "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", 935 | "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", 936 | "requires": { 937 | "browser-process-hrtime": "^1.0.0" 938 | } 939 | }, 940 | "w3c-xmlserializer": { 941 | "version": "3.0.0", 942 | "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", 943 | "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", 944 | "requires": { 945 | "xml-name-validator": "^4.0.0" 946 | } 947 | }, 948 | "webidl-conversions": { 949 | "version": "7.0.0", 950 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 951 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" 952 | }, 953 | "whatwg-encoding": { 954 | "version": "2.0.0", 955 | "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", 956 | "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", 957 | "requires": { 958 | "iconv-lite": "0.6.3" 959 | } 960 | }, 961 | "whatwg-mimetype": { 962 | "version": "3.0.0", 963 | "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", 964 | "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==" 965 | }, 966 | "whatwg-url": { 967 | "version": "10.0.0", 968 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", 969 | "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", 970 | "requires": { 971 | "tr46": "^3.0.0", 972 | "webidl-conversions": "^7.0.0" 973 | } 974 | }, 975 | "word-wrap": { 976 | "version": "1.2.3", 977 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 978 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" 979 | }, 980 | "wordwrapjs": { 981 | "version": "4.0.1", 982 | "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", 983 | "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", 984 | "requires": { 985 | "reduce-flatten": "^2.0.0", 986 | "typical": "^5.2.0" 987 | }, 988 | "dependencies": { 989 | "typical": { 990 | "version": "5.2.0", 991 | "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", 992 | "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==" 993 | } 994 | } 995 | }, 996 | "ws": { 997 | "version": "8.13.0", 998 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", 999 | "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==" 1000 | }, 1001 | "xml-name-validator": { 1002 | "version": "4.0.0", 1003 | "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", 1004 | "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==" 1005 | }, 1006 | "xmlchars": { 1007 | "version": "2.2.0", 1008 | "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", 1009 | "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" 1010 | } 1011 | } 1012 | } 1013 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "proposal-promise-with-resolvers", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "polyfills.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "ecmarkup --lint-spec --strict --load-biblio @tc39/ecma262-biblio spec.html docs/index.html" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/tc39/proposal-promise-with-resolvers.git" 13 | }, 14 | "keywords": [], 15 | "author": "", 16 | "license": "ISC", 17 | "bugs": { 18 | "url": "https://github.com/tc39/proposal-promise-with-resolvers/issues" 19 | }, 20 | "dependencies": { 21 | "@tc39/ecma262-biblio": "^2.1.2558", 22 | "ecmarkup": "^17.0.0" 23 | }, 24 | "homepage": "https://github.com/tc39/proposal-promise-with-resolvers#readme" 25 | } 26 | -------------------------------------------------------------------------------- /polyfills.js: -------------------------------------------------------------------------------- 1 | export function withResolvers() { 2 | if (!this) throw new TypeError("Promise.withResolvers called on non-object") 3 | const out = {} 4 | out.promise = new this((resolve_, reject_) => { 5 | out.resolve = resolve_ 6 | out.reject = reject_ 7 | }) 8 | return out 9 | } 10 | -------------------------------------------------------------------------------- /spec.html: -------------------------------------------------------------------------------- 1 |
 2 |   title: ES Promise.withResolvers (2023)
 3 |   status: proposal
 4 |   stage: 2
 5 |   location: https://github.com/tc39/proposal-promise-with-resolvers
 6 |   copyright: false
 7 |   contributors: Peter Klecha
 8 | 
9 | 10 | 11 | 12 | 13 |

Introduction

14 |

This is the formal specification for a proposed `Promise.withResolvers` method 15 | in JavaScript. It modifies the original ECMAScript specification with 17 | several new or revised clauses. See the proposal's 19 | explainer for the proposal's background, motivation, and usage examples.

20 |
21 | 22 | 23 |

Control Abstraction Objects

24 | 25 | 26 |

Promise Objects

27 | 28 | 29 |

Properties of the Promise Constructor

30 | 31 | 32 |

Promise.withResolvers ( )

33 |

34 | This function returns an object with three properties: a new promise plus the `resolve` and `reject` functions associated with that promise. 35 |

36 | 37 | 1. Let _C_ be the *this* value. 38 | 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). 39 | 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%). 40 | 1. Perform ! CreateDataPropertyOrThrow(_obj_, "promise", _promiseCapability_.[[Promise]]). 41 | 1. Perform ! CreateDataPropertyOrThrow(_obj_, "resolve", _promiseCapability_.[[Resolve]]). 42 | 1. Perform ! CreateDataPropertyOrThrow(_obj_, "reject", _promiseCapability_.[[Reject]]). 43 | 1. Return _obj_. 44 | 45 |
46 |
47 |
48 |
49 | --------------------------------------------------------------------------------