{"_id":"@putout/plugin-apply-top-level-await","_rev":"4155179","name":"@putout/plugin-apply-top-level-await","description":"putout plugin adds ability to apply top level await","dist-tags":{"latest":"2.0.2"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:23:37.000Z","created":"2019-10-11T21:29:09.963Z","2.0.2":"2022-02-07T10:30:27.922Z","2.0.1":"2020-03-25T15:04:19.133Z","2.0.0":"2020-03-08T08:10:25.564Z","1.0.2":"2020-02-03T10:00:28.447Z","1.0.1":"2019-10-11T21:32:12.382Z","1.0.0":"2019-10-11T21:29:09.963Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"versions":{"2.0.2":{"name":"@putout/plugin-apply-top-level-await","version":"2.0.2","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to apply top level await","homepage":"https://github.com/coderaiser/putout/tree/v24.5.0/packages/plugin-apply-top-level-await#readme","main":"lib/apply-top-level-await.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{"fullstore":"^3.0.0"},"keywords":["putout","putout-plugin","plugin","top-level-await"],"devDependencies":{"@putout/test":"^1.0.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0","lerna":"^3.8.5","madrun":"^5.0.0","nodemon":"^2.0.1","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=7.17"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"gitHead":"9dbf1ad303cc64052720d726e9de58ee89144188","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-top-level-await@2.0.2","_nodeVersion":"16.13.2","_npmVersion":"8.3.0","dist":{"shasum":"ed61ac4ee9bb04834715d0eb0f0c5271abbc95c4","size":2059,"noattachment":false,"key":"/@putout/plugin-apply-top-level-await/-/@putout/plugin-apply-top-level-await-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-top-level-await/download/@putout/plugin-apply-top-level-await-2.0.2.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-apply-top-level-await_2.0.2_1644229827784_0.9263772596369508"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-02-07T10:30:37.147Z","publish_time":1644229827922,"_cnpm_publish_time":1644229827922},"2.0.1":{"name":"@putout/plugin-apply-top-level-await","version":"2.0.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to apply top level await","homepage":"http://github.com/coderaiser/putout","main":"lib/apply-top-level-await.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{"fullstore":"^3.0.0"},"keywords":["putout","putout-plugin","plugin","top-level-await"],"devDependencies":{"@putout/test":"^1.0.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0","lerna":"^3.8.5","madrun":"^5.0.0","nodemon":"^2.0.1","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=7.17"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-top-level-await@2.0.1","_nodeVersion":"13.11.0","_npmVersion":"6.12.1","dist":{"shasum":"dee87ae2c01d3851827a8e4ddc92e187cb886640","size":2063,"noattachment":false,"key":"/@putout/plugin-apply-top-level-await/-/@putout/plugin-apply-top-level-await-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-top-level-await/download/@putout/plugin-apply-top-level-await-2.0.1.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-apply-top-level-await_2.0.1_1585148658942_0.583471977611522"},"_hasShrinkwrap":false,"publish_time":1585148659133,"_cnpm_publish_time":1585148659133,"_cnpmcore_publish_time":"2021-12-16T22:34:36.632Z"},"2.0.0":{"name":"@putout/plugin-apply-top-level-await","version":"2.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to apply top level await","homepage":"http://github.com/coderaiser/putout","main":"lib/apply-top-level-await.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{"fullstore":"^2.0.2"},"keywords":["putout","putout-plugin","plugin","top-level-await"],"devDependencies":{"@putout/test":"^1.0.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0","lerna":"^3.8.5","madrun":"^5.0.0","nodemon":"^2.0.1","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=7.17"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-top-level-await@2.0.0","_nodeVersion":"13.10.1","_npmVersion":"6.12.1","dist":{"shasum":"10efedf4f496bca8623f7b9a9a14b4a9b603e9be","size":2064,"noattachment":false,"key":"/@putout/plugin-apply-top-level-await/-/@putout/plugin-apply-top-level-await-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-top-level-await/download/@putout/plugin-apply-top-level-await-2.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-apply-top-level-await_2.0.0_1583655025322_0.3550729585952692"},"_hasShrinkwrap":false,"publish_time":1583655025564,"_cnpm_publish_time":1583655025564,"_cnpmcore_publish_time":"2021-12-16T22:34:36.841Z"},"1.0.2":{"name":"@putout/plugin-apply-top-level-await","version":"1.0.2","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to apply top level await","homepage":"http://github.com/coderaiser/putout","main":"lib/apply-top-level-await.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{"fullstore":"^2.0.2"},"keywords":["putout","putout-plugin","plugin","top-level-await"],"devDependencies":{"@putout/test":"^1.0.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0","lerna":"^3.8.5","madrun":"^5.0.0","nodemon":"^2.0.1","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=4.36"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-top-level-await@1.0.2","_nodeVersion":"13.7.0","_npmVersion":"6.12.1","dist":{"shasum":"b1a42d0f57d0761a2fb3bf47b5bbc7c515c160a4","size":2066,"noattachment":false,"key":"/@putout/plugin-apply-top-level-await/-/@putout/plugin-apply-top-level-await-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-top-level-await/download/@putout/plugin-apply-top-level-await-1.0.2.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-apply-top-level-await_1.0.2_1580724028288_0.25892135273559536"},"_hasShrinkwrap":false,"publish_time":1580724028447,"_cnpm_publish_time":1580724028447,"_cnpmcore_publish_time":"2021-12-16T22:34:37.070Z"},"1.0.1":{"name":"@putout/plugin-apply-top-level-await","version":"1.0.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to apply top level await","homepage":"http://github.com/coderaiser/putout","main":"lib/apply-top-level-await.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{"fullstore":"^2.0.2"},"keywords":["putout","putout-plugin","plugin","top-level-await"],"devDependencies":{"@putout/test":"^1.0.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^10.0.0","eslint-plugin-putout":"^2.0.0","lerna":"^3.8.5","madrun":"^3.0.0","nodemon":"^1.14.12","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=4.36"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-top-level-await@1.0.1","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"shasum":"8df88b294fee8fe5256b0c301d1a7628d0154128","size":2070,"noattachment":false,"key":"/@putout/plugin-apply-top-level-await/-/@putout/plugin-apply-top-level-await-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-top-level-await/download/@putout/plugin-apply-top-level-await-1.0.1.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-apply-top-level-await_1.0.1_1570829532215_0.6312139710376758"},"_hasShrinkwrap":false,"publish_time":1570829532382,"_cnpm_publish_time":1570829532382,"_cnpmcore_publish_time":"2021-12-16T22:34:37.299Z"},"1.0.0":{"name":"@putout/plugin-apply-top-level-await","version":"1.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to apply top level await","homepage":"http://github.com/coderaiser/putout","main":"lib/apply-top-level-await.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","top-level-await"],"devDependencies":{"@putout/test":"^1.0.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^10.0.0","eslint-plugin-putout":"^2.0.0","lerna":"^3.8.5","madrun":"^3.0.0","nodemon":"^1.14.12","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=4.36"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-apply-top-level-await@1.0.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"shasum":"122546c3768def43b04ce2a01deccd3ab39a0b30","size":2061,"noattachment":false,"key":"/@putout/plugin-apply-top-level-await/-/@putout/plugin-apply-top-level-await-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-apply-top-level-await/download/@putout/plugin-apply-top-level-await-1.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-apply-top-level-await_1.0.0_1570829349831_0.7329258110735186"},"_hasShrinkwrap":false,"publish_time":1570829349963,"_cnpm_publish_time":1570829349963,"_cnpmcore_publish_time":"2021-12-16T22:34:37.516Z"}},"readme":"# @putout/plugin-apply-top-level-await [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-top-level-await.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-top-level-await\"npm\"\n\n????[`Putout`](https://github.com/coderaiser/putout) plugin applies [top-level-await](https://v8.dev/features/top-level-await). Part of [@putout/promises](https://github.com/coderaiser/putout/tree/v24.5.0/packages/plugin-promises).\n\n## Install\n\n```\nnpm i @putout/plugin-apply-top-level-await\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"apply-top-level-await\": \"on\"\n    }\n}\n```\n\n## ❌ Incorrect code example\n\n```js\nimport fs from 'fs';\n(async () => {\n    const data = await fs.promises.readFile('hello.txt');\n})();\n```\n\n## ✅ Correct code Example\n\n```js\nimport fs from 'fs';\nconst data = await fs.promises.readFile('hello.txt');\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/v24.5.0/packages/plugin-apply-top-level-await#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}