{"_id":"@awaitbox/window-loaded","_rev":"6-b21380da5a09eb02778d9092631caf8e","name":"@awaitbox/window-loaded","description":"@awaitbox/window-loaded =======================","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@awaitbox/window-loaded","version":"1.0.0","main":"src/index.js","esnext":"src/index.js","module":"src/index.js","gitHead":"fed6ec33908299404363d71c258a9baac09c989b","description":"window-loaded =============","_id":"@awaitbox/window-loaded@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.5.0","_npmUser":{"name":"trusktr","email":"joe@trusktr.io"},"dist":{"integrity":"sha512-iyodbANR1kzoKpfx+aFq+wsjj3w3RxbQssvjgdOpdXPW+BXIN++iCr2u8Ag1MXNXRt9VnwsA5p8ao/3JTwN+Sw==","shasum":"7de049816c17d467c705fd6196a6882e69ecd8a5","tarball":"https://registry.npmjs.org/@awaitbox/window-loaded/-/window-loaded-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHcPFBMfJztvrS5Df50DF4cZPifHJoYHUgEkemwW4+WuAiBnFVDV14ba8/1V3zAOJYrvZJaxJ8VK/QFuy+5eGAezfQ=="}]},"maintainers":[{"name":"trusktr","email":"joe@trusktr.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/window-loaded-1.0.0.tgz_1515190281800_0.06450355425477028"}},"1.0.1":{"name":"@awaitbox/window-loaded","version":"1.0.1","main":"src/index.js","esnext":"src/index.js","module":"src/index.js","keywords":["async","async-functions","async-await","await","dom","window","web-development","webdev"],"gitHead":"dc47ab542fe613a236a4adadc8d97bfc8c28313a","description":"window-loaded =============","_id":"@awaitbox/window-loaded@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.5.0","_npmUser":{"name":"trusktr","email":"joe@trusktr.io"},"dist":{"integrity":"sha512-v5mCyj/6RKCP1yaUagWlTLd/SRHNuDW3FcntjhE5qgXl0sX4ZZNVVtJNPdXSTuCdhr4JXvwvRjOmrQva0ed3JQ==","shasum":"83328b075e4fb2290d2d2a585f588bbf160b3ee5","tarball":"https://registry.npmjs.org/@awaitbox/window-loaded/-/window-loaded-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJEmREoZACYOSsyGsNDVhYV9OVdYl4UeI8XA3GOkUCNAiEA3xBfGeJ7Hv3dVvnWusX1eX7TodcpV95XnVSZBAxKlO8="}]},"maintainers":[{"name":"trusktr","email":"joe@trusktr.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/window-loaded-1.0.1.tgz_1515190511543_0.6465808188077062"}},"1.0.2":{"name":"@awaitbox/window-loaded","version":"1.0.2","main":"src/index.js","esnext":"src/index.js","module":"src/index.js","keywords":["async","async-functions","async-await","await","dom","window","web-development","webdev"],"gitHead":"d34dc76a5d9159b72f5f20295a08b2de882fecc8","description":"window-loaded =============","_id":"@awaitbox/window-loaded@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"8.5.0","_npmUser":{"name":"trusktr","email":"joe@trusktr.io"},"dist":{"integrity":"sha512-NmLvuBlFc6+YZ2wmhpWohHh2zWN+Zgaa9WJul+sgkoum3gg7/eJC0Yb1fh3kof2Yt37jjv4P+vPwv+SnKNfpMA==","shasum":"8c373c64fb8d03133188fff3404c439b65129070","tarball":"https://registry.npmjs.org/@awaitbox/window-loaded/-/window-loaded-1.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG253tQMBJgocd4QV2Pq1GiAOtaZsAGYM39kBz+J3DJzAiBTz7U7aY+Ny00d24UJ3FQVbgm3M28ZgWYLmQXtwaNjfA=="}]},"maintainers":[{"name":"trusktr","email":"joe@trusktr.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/window-loaded-1.0.2.tgz_1515191114726_0.6833766668569297"}},"1.0.3":{"name":"@awaitbox/window-loaded","version":"1.0.3","main":"src/index.js","esnext":"src/index.js","module":"src/index.js","keywords":["async","async-functions","async-await","await","dom","window","web-development","webdev"],"gitHead":"b5512a604b21dc1b339dfe5d2426b3c1b53fe01a","description":"@awaitbox/window-loaded =======================","_id":"@awaitbox/window-loaded@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"8.5.0","_npmUser":{"name":"trusktr","email":"joe@trusktr.io"},"dist":{"integrity":"sha512-DddqFgvZg9SnCuDss6znECRQy0pG5z6W2OQjv3ZIZtRwcqLs5LaSCfbawLljOaozyLvQ+TbNx+uPKZBmNAUO4w==","shasum":"91bc5279d4aaf5585fef0c4d5ffc025e7e68d455","tarball":"https://registry.npmjs.org/@awaitbox/window-loaded/-/window-loaded-1.0.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE5jFnJWdcI4R+yq3w95+UYL0qivpWsUn2ulWWO7gWRzAiB3SOXFkXUAmtDmR7KpWBdSoPGrAs4ewJINvDJqpNSPqA=="}]},"maintainers":[{"name":"trusktr","email":"joe@trusktr.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/window-loaded-1.0.3.tgz_1515191448678_0.785318701993674"}},"1.0.4":{"name":"@awaitbox/window-loaded","version":"1.0.4","main":"src/index.js","esnext":"src/index.js","module":"src/index.js","homepage":"https://github.com/awaitbox/window-loaded","repository":{"type":"git","url":"git+ssh://git@github.com/awaitbox/window-loaded.git"},"bugs":{"url":"https://github.com/awaitbox/window-loaded/issues"},"keywords":["async","async-functions","async-await","await","dom","window","web-development","webdev"],"gitHead":"9e1a4f13990fb1a4863b6c4119d3802f381774eb","description":"@awaitbox/window-loaded =======================","_id":"@awaitbox/window-loaded@1.0.4","_npmVersion":"5.6.0","_nodeVersion":"8.5.0","_npmUser":{"name":"trusktr","email":"joe@trusktr.io"},"dist":{"integrity":"sha512-1oAOpon73+6Yr75juied44mILVJUMUPsHt50yA8hZFXEx4xyW2W+DCAcXLWm0bqI+Fvb3r7Q+Z+LXMjgAO0d8g==","shasum":"e529d3597efd81b800f0760ef8bc766bca09c3cd","tarball":"https://registry.npmjs.org/@awaitbox/window-loaded/-/window-loaded-1.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/kB4JnUZreCkVKcrCK0Bisp/WDjH23h3H/WnXdIbZOwIgaVHdKaWlrVNCGMnCcLbjAM7r6A1HTpbRLHVMZ7UtKws="}]},"maintainers":[{"name":"trusktr","email":"joe@trusktr.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/window-loaded-1.0.4.tgz_1515192447507_0.9624000147450715"}},"1.0.5":{"name":"@awaitbox/window-loaded","version":"1.0.5","main":"src/index.js","esnext":"src/index.js","module":"src/index.js","homepage":"https://github.com/awaitbox/window-loaded","repository":{"type":"git","url":"git+ssh://git@github.com/awaitbox/window-loaded.git"},"bugs":{"url":"https://github.com/awaitbox/window-loaded/issues"},"keywords":["async","async-functions","async-await","await","dom","window","web-development","webdev"],"gitHead":"eb614c4a510c10895af0222e4872d5fb395efaca","description":"@awaitbox/window-loaded =======================","_id":"@awaitbox/window-loaded@1.0.5","_npmVersion":"5.6.0","_nodeVersion":"8.5.0","_npmUser":{"name":"trusktr","email":"joe@trusktr.io"},"dist":{"integrity":"sha512-y/YNyAEYHqmgan5J9ZBUyqjyxOlUUw+JjcOpnJ1rydQ8Hm7zpDL4KowwkkuBQJV+RBpzvi8OtGmnwOPSp+4irw==","shasum":"bfd5faec8a94bc5f17163248e712d717d317a358","tarball":"https://registry.npmjs.org/@awaitbox/window-loaded/-/window-loaded-1.0.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxUQmJbFz/KyH4LE5OQusqg7lQxaWlE6oB4hdkgcHf2AIgSFOjX+/+VxXUYJsWdVMAt6pLmwx/4srpPR/iJHIhPPM="}]},"maintainers":[{"name":"trusktr","email":"joe@trusktr.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/window-loaded-1.0.5.tgz_1515204939507_0.6177693579811603"}}},"readme":"\n@awaitbox/window-loaded\n=======================\n\nAwait for the `window` to be loaded.\n\n#### `npm i @awaitbox/window-loaded --save`\n\nThe `windowLoaded` async function returns a promise that will resolve when the\n`window`'s `load` event fires in the future (i.e. sub-resources like img tags,\nscripts, audio tags, etc, have finished loading), or resolves immediately if\n`loaded` already happened.\n\nLearn more about the `load` event [on\nMDN](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onload).\n\nYou can use it in async functions:\n\n```js\nimport windowLoaded from '@awaitbox/window-loaded'\n\nasync function main() {\n  await windowLoaded()\n  console.log( 'Ready to begin awesome!' )\n}\n\nmain()\n```\n\nYou can of course use it as a Promise:\n\n```js\nimport windowLoaded from '@awaitbox/window-loaded'\n\nwindowLoaded()\n  .then( data => console.log( 'begin awesome!' ) )\n```\n\nChain values will pass through if you use it in a Promise chain:\n\n```js\nimport windowLoaded from '@awaitbox/window-loaded'\n\nfetch( ... )\n  .then( ... )\n  .then( windowLoaded ) // passes data through\n  .then( data => console.log( 'use data for the awesome!', data ) )\n```\n\nNote\n----\n\nThis is written in ES2016 JavaScript. To use this in pre-ES2016 environments,\nyou'll need to run this through a transpiler like [Babel](http://babeljs.io)\n(and I recommend using the\n[fast-async](https://github.com/MatAtBread/fast-async) plugin to get the best\nresults). See some tips here on wiring it up with\n[Webpack](https://webpack.js.org): http://2ality.com/2017/06/pkg-esnext.html.\n","maintainers":[{"name":"trusktr","email":"joe@trusktr.io"}],"time":{"modified":"2022-04-04T16:49:17.932Z","created":"2018-01-05T22:11:21.905Z","1.0.0":"2018-01-05T22:11:21.905Z","1.0.1":"2018-01-05T22:15:11.622Z","1.0.2":"2018-01-05T22:25:14.922Z","1.0.3":"2018-01-05T22:30:49.014Z","1.0.4":"2018-01-05T22:47:27.599Z","1.0.5":"2018-01-06T02:15:39.590Z"},"readmeFilename":"README.md","keywords":["async","async-functions","async-await","await","dom","window","web-development","webdev"],"homepage":"https://github.com/awaitbox/window-loaded","repository":{"type":"git","url":"git+ssh://git@github.com/awaitbox/window-loaded.git"},"bugs":{"url":"https://github.com/awaitbox/window-loaded/issues"}}