{"_id":"@krakenjs/zalgo-promise","_rev":"12-7af9d329a990543c598e5b7d0a81392f","name":"@krakenjs/zalgo-promise","dist-tags":{"latest":"2.0.1","alpha":"3.0.0-typescript.1"},"versions":{"1.0.48":{"name":"@krakenjs/zalgo-promise","version":"1.0.48","keywords":["template"],"_id":"@krakenjs/zalgo-promise@1.0.48","maintainers":[{"name":"bluepnume","email":"daniel@bluesuncorp.co.uk"},{"name":"gregjopa","email":"grjopa@gmail.com"},{"name":"sdk-integrations-npm","email":"sdk-integrations-npm@paypal.com"},{"name":"wsbrunson","email":"brunson.ws@gmail.com"},{"name":"westeezy","email":"westin.wrzesinski@gmail.com"},{"name":"mstuart","email":"stuartmark@gmail.com"},{"name":"sioked","email":"sioked@gmail.com"}],"homepage":"https://github.com/krakenjs/zalgo-promise#readme","bugs":{"url":"https://github.com/krakenjs/zalgo-promise/issues"},"dist":{"shasum":"9322e515e158f95b3119d03bc70e7dd4549bd41c","tarball":"https://registry.npmjs.org/@krakenjs/zalgo-promise/-/zalgo-promise-1.0.48.tgz","fileCount":25,"integrity":"sha512-oI5IPLoKTHCt8rcjtarVEwuR3DvLbIQzypItGjya/CDNLF733fnsDshmTIIxbBD0dw/NYWr5gYvUJRbJC9Ncxg==","signatures":[{"sig":"MEUCIEobHRkid1OZV7ACiaMjP5NxTxmpxaUxkLSVHTOr41L1AiEAyvzqoTFXLQEoogWpc0BLNIACFFXOcTFbU+y1YaYmuts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":120091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiG8paACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWiw//SOqNdPYUhufHdAYX7rHUS4FZMU591tfCRI/QrmeF9nFbs+Z/\r\n9qi1J09lsOExaOai2r6hRlvuv+WWtAI5W3neC4PV3TXWVGDyQtDlzlpPQlmK\r\n9mW2sTZzzoHo1c4BeyMLT/wyqcabxwE/XTpq3yleN5I4kZl7tYr5/sDCT0xh\r\nTSYQC48XkKArNNPczNBf8XxHGwI26j2GqSnuc39tuUkDiHIoJxq6lzxNSkZN\r\nzHO8G60ifTEHYg83x8Cgaxo46UG/EQ41FtO7QdSIW/SaM9PHYXQyq34sxkzQ\r\nHZp7TgNoRg+LZc1cO9FBaKG1shRzJOEZDvj/52nonN6h2P55YrimvskSzXrE\r\nRCvYBI1V65RoQmpi+wlM7lb68eIhemhPmg1QjQqTqdeSm8TfO5czcrOb4o3j\r\nTQymdoxsTj+Ck1dn3w69lx0HB4vn8un/fEc+D63FQWgdtrjXLM66dWVRZ8Fr\r\nYkNBvTG+ePpnGRNUNL8TRt6BmqU2Lmy3UcV8nxrVNKjww5OvcQcMD/p9nDUR\r\nFlZdX2QapELgaEAncB9QW3bcrP43uWmQhPPeY5Mz8b0FF6Pu8QNbum9djeo9\r\nbyStuMzZhTo9L9t128lVfAx5RfxQGyFh8pa3Gy02VBiydEJuGJWbuKD6RLP0\r\n0f8Oj5XBzNhyB+rvZMtgh4Nw8UriKFGMvqA=\r\n=OsqO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"2643c9e4e642b75d2dc9d756f11eacc7b43915b3","scripts":{"flow":"flow","lint":"eslint src/ test/ *.js","test":"npm run lint && npm run flow-typed && npm run flow && npm run karma","babel":"babel src/ --out-dir dist/module","build":"npm run test && npm run babel && npm run webpack","clean":"rimraf dist coverage","debug":"cross-env NODE_ENV=debug","karma":"cross-env NODE_ENV=test babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/karma start","setup":"npm install && npm run flow-typed","prepare":"husky install","release":"standard-version","webpack":"babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/webpack --display-optimization-bailout --progress","reinstall":"rimraf flow-typed && rimraf node_modules && npm install && flow-typed install","flow-typed":"flow-typed install","prerelease":"npm run clean && npm run build && git add dist && git commit -m 'ci: check in dist folder' || echo 'Nothing to distribute'","postrelease":"git push && git push --follow-tags && npm publish"},"_npmUser":{"name":"westeezy","email":"westin.wrzesinski@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0.html","type":"Apache 2.0"}],"repository":{"url":"git://github.com/krakenjs/zalgo-promise.git","type":"git"},"_npmVersion":"6.14.16","description":"Javascript module template.","directories":{},"_nodeVersion":"14.19.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"husky":"^7.0.4","mocha":"^4","flow-bin":"0.155.0","@commitlint/cli":"^16.2.1","grumbler-scripts":"^5.0.3","standard-version":"^9.3.2","@commitlint/config-conventional":"^16.2.1"},"standard-version":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","hidden":false},{"type":"docs","hidden":false},{"type":"style","hidden":false},{"type":"refactor","hidden":false},{"type":"perf","hidden":false},{"type":"test","hidden":false},{"type":"ci","hidden":true}]},"_npmOperationalInternal":{"tmp":"tmp/zalgo-promise_1.0.48_1645988442364_0.06835083558887978","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@krakenjs/zalgo-promise","version":"2.0.0","keywords":["template"],"_id":"@krakenjs/zalgo-promise@2.0.0","maintainers":[{"name":"bluepnume","email":"daniel@bluesuncorp.co.uk"},{"name":"gregjopa","email":"grjopa@gmail.com"},{"name":"sdk-integrations-npm","email":"sdk-integrations-npm@paypal.com"},{"name":"wsbrunson","email":"brunson.ws@gmail.com"},{"name":"westeezy","email":"westin.wrzesinski@gmail.com"},{"name":"mstuart","email":"stuartmark@gmail.com"},{"name":"sioked","email":"sioked@gmail.com"}],"homepage":"https://github.com/krakenjs/zalgo-promise#readme","bugs":{"url":"https://github.com/krakenjs/zalgo-promise/issues"},"dist":{"shasum":"366cb8cb908396f0a5557cc28bb6b8ce5e01b96a","tarball":"https://registry.npmjs.org/@krakenjs/zalgo-promise/-/zalgo-promise-2.0.0.tgz","fileCount":23,"integrity":"sha512-/2NiqlJyHBR3x9nshBgqhHvgahKEHtSRz+X1/r0IoeX3uras1LTtDqq4s0zvvZSJQ1hoAJx1Yk4ZuYMtbftfcg==","signatures":[{"sig":"MEUCIEH0EkFtezQFKL0ugg4Mh+jTEpd92FBKQqzpa0XG8GcWAiEAv3RnweX6MHT6PwVJU7F4hRXfTywmncTojZ6V9ZXSq68=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiG914ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriSA/+OhnfYNmDCoHOOZMYZaa374U3u+s3YKiBu7w1Q9iDhzOlfcoM\r\n78/EagMusqCLoRvZZbuo95DJLgJl9FUaFRUa9isDKhj+8joxGc5fBXmqonwc\r\njqdOEbbswNT9uT0J/dTimOYgXhTbzFwaD917/Tx/gg5fp3uIKR27WelWvGHR\r\nbp2NU8TIloyp4XD7PcIBARzZ7ms5VRC4i1VvXQ7DiK3z1eSGNTMxKIUaHjqG\r\nwtQNegFeBcg8JaPgkp/th5e73RNCFXX2uVqTtmqdQpwcs4CRm8N20HNWr0n+\r\nXgFA5JJQqIOuO6yhrxo/y2kciHHbV7qxuIjs2YxsHxBZyYoM4Lh57gH0UHw+\r\noIGqTF5S1YAEf8niPeD59N8qt/LzTqJ/dGqnhtnllqomDvICgphQ8EBwbyG1\r\ncy0RvdMydzVV1eaz444I6FYvAWeY+Bo4rFC+phws1YzXuGyTWl7gyswCORng\r\nercSr9f+qyNLORIj7DGBsv9CB8n2B+llPNbl5JI9pL1JYl6HvCbyu0OwuSkI\r\nyxYDGdtrJIzWW56Eh5112XMSxLw/n/Sb5Z8m+Sn3geE39v2Z5u/zVKkrJIvd\r\nUnLS7onGd3BwZbiqm+xXPspszNC8qsMwQJ/eNDS4kW5rSiZQDS1TWu9h3dzT\r\nHBemRlNj9SbHwDS97gKTTmEaMGDkCKvik6E=\r\n=a8vK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"8f211fbaf719862ca473044071b6a267cc5440f8","scripts":{"flow":"flow","lint":"eslint src/ test/ *.js","test":"npm run lint && npm run flow-typed && npm run flow && npm run karma","babel":"babel src/ --out-dir dist/module","build":"npm run test && npm run babel && npm run webpack","clean":"rimraf dist coverage","debug":"cross-env NODE_ENV=debug","karma":"cross-env NODE_ENV=test babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/karma start","setup":"npm install && npm run flow-typed","prepare":"husky install","release":"standard-version","webpack":"babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/webpack --display-optimization-bailout --progress","reinstall":"rimraf flow-typed && rimraf node_modules && npm install && flow-typed install","flow-typed":"flow-typed install","prerelease":"npm run clean && npm run build && git add dist && git commit -m 'ci: check in dist folder' || echo 'Nothing to distribute'","postrelease":"git push && git push --follow-tags && npm publish"},"_npmUser":{"name":"westeezy","email":"westin.wrzesinski@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0.html","type":"Apache 2.0"}],"repository":{"url":"git://github.com/krakenjs/zalgo-promise.git","type":"git"},"_npmVersion":"6.14.16","description":"Javascript module template.","directories":{},"_nodeVersion":"14.19.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"husky":"^7.0.4","mocha":"^4","flow-bin":"0.155.0","@commitlint/cli":"^16.2.1","grumbler-scripts":"^5.0.3","standard-version":"^9.3.2","@commitlint/config-conventional":"^16.2.1"},"standard-version":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","hidden":false},{"type":"docs","hidden":false},{"type":"style","hidden":false},{"type":"refactor","hidden":false},{"type":"perf","hidden":false},{"type":"test","hidden":false},{"type":"ci","hidden":true}]},"_npmOperationalInternal":{"tmp":"tmp/zalgo-promise_2.0.0_1645993335839_0.7823705735656219","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@krakenjs/zalgo-promise","version":"2.0.1","keywords":["template"],"_id":"@krakenjs/zalgo-promise@2.0.1","maintainers":[{"name":"bluepnume","email":"daniel@bluesuncorp.co.uk"},{"name":"gregjopa","email":"grjopa@gmail.com"},{"name":"sdk-integrations-npm","email":"sdk-integrations-npm@paypal.com"},{"name":"wsbrunson","email":"brunson.ws@gmail.com"},{"name":"westeezy","email":"westin.wrzesinski@gmail.com"},{"name":"mstuart","email":"stuartmark@gmail.com"},{"name":"sioked","email":"sioked@gmail.com"}],"homepage":"https://github.com/krakenjs/zalgo-promise#readme","bugs":{"url":"https://github.com/krakenjs/zalgo-promise/issues"},"dist":{"shasum":"36b4225a566f0a0903a8d771a11a9efc131c6987","tarball":"https://registry.npmjs.org/@krakenjs/zalgo-promise/-/zalgo-promise-2.0.1.tgz","fileCount":23,"integrity":"sha512-n30eknZjD7z8/joFqjI8FIDZ0yJPZHcQBce1B3tAumwNZL0C42Ta/w37MfthxHV61JHEFGfy7b727h/kzagJDA==","signatures":[{"sig":"MEQCIFxL5azeLREv4SxzUTQ8gicgf3ozxl9S8aZK7pwhPESqAiBXslPUIf+hBhzMePpzi7ZgHEqf8ewYM9Wo/AqFt8ZT6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiG/LgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmom0w//fbLPLFGs3shIGDb6NcIkJ6wABQF3w8/UpbbrUHii/+iOrCDY\r\n8LZddNvt32GwnD32QzmAkuKtB1Tf2/kCqRy0Ul8SwKQ5oyFF4sMGIdmK+eII\r\n7FaOMJn2RVq5Nk5L2qXIZ4ZBnMYFnTVYz3yAy3LSUAAwpB10eJZwUPJOliVm\r\nUbf4cUDdM9HHXWd3c4J8oTUpfeu+rbb+WBSXiyedi6obS7UkragPeXa1M1pX\r\nX+PtQzFjA/EuUxw7NSrY/n5Kf+r7FmVHfRvlanGtUj2E9gXnJV45sgUnX6dY\r\nmRzYiPmroXspkmldHJPaRlzNIYV91ur91SeVmbtTPApDC7mWqvf0B7HE8I2s\r\nLN2pUl0zUQDYCZIgmVAKC3zxu2VrTAjL4kmq0KE00OgiW/NpryUzCFBvdtIB\r\nGAhoQgChwEQaqJ0xWdYQviWXgDhpZEeal1j6NcirRd7A2t3SPWbEIU0sXgnn\r\nUviZE4B+AMYAD9gsiLDjbMzPIEGEsCi28Porlq4mV1XgtEa0Z9YhSdeMcqBz\r\nc2FG7lJ+tx93Lu1RzjaXza6jV3DXGIghMx/uhT3bApaOUuRx5BkozTnFrs4q\r\nARDezWsrvMrViNlxYVb862+fks+SaovVieHaAdFdmCgo4wEMvLkOTD3J4OPi\r\no9dp8NPVIkXE+EiV7Vtyg2fi/x9uW84+R2k=\r\n=TLW0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d7adfce27faf059d30713b67213c0d49c2ab854c","scripts":{"flow":"flow","lint":"eslint src/ test/ *.js","test":"npm run lint && npm run flow-typed && npm run flow && npm run karma","babel":"babel src/ --out-dir dist/module","build":"npm run test && npm run babel && npm run webpack","clean":"rimraf dist coverage","debug":"cross-env NODE_ENV=debug","karma":"cross-env NODE_ENV=test babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/karma start","setup":"npm install && npm run flow-typed","prepare":"husky install","release":"standard-version","webpack":"babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/webpack --display-optimization-bailout --progress","reinstall":"rimraf flow-typed && rimraf node_modules && npm install && flow-typed install","flow-typed":"flow-typed install","prerelease":"npm run clean && npm run build && git add dist && git commit -m 'ci: check in dist folder' || echo 'Nothing to distribute'","postrelease":"git push && git push --follow-tags && npm publish"},"_npmUser":{"name":"sdk-integrations-npm","email":"sdk-integrations-npm@paypal.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0.html","type":"Apache 2.0"}],"repository":{"url":"git://github.com/krakenjs/zalgo-promise.git","type":"git"},"_npmVersion":"6.14.16","description":"Javascript module template.","directories":{},"_nodeVersion":"14.19.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"husky":"^7.0.4","mocha":"^4","flow-bin":"0.155.0","@commitlint/cli":"^16.2.1","grumbler-scripts":"^5.0.3","standard-version":"^9.3.2","@commitlint/config-conventional":"^16.2.1"},"standard-version":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","hidden":false},{"type":"docs","hidden":false},{"type":"style","hidden":false},{"type":"refactor","hidden":false},{"type":"perf","hidden":false},{"type":"test","hidden":false},{"type":"ci","hidden":true}]},"_npmOperationalInternal":{"tmp":"tmp/zalgo-promise_2.0.1_1645998816294_0.9122566855967831","host":"s3://npm-registry-packages"}},"3.0.0-alpha.1":{"name":"@krakenjs/zalgo-promise","version":"3.0.0-alpha.1","keywords":["template"],"_id":"@krakenjs/zalgo-promise@3.0.0-alpha.1","maintainers":[{"name":"gregjopa","email":"grjopa@gmail.com"},{"name":"sdk-integrations-npm","email":"sdk-integrations-npm@paypal.com"},{"name":"wsbrunson","email":"brunson.ws@gmail.com"},{"name":"westeezy","email":"westin.wrzesinski@gmail.com"},{"name":"mstuart","email":"stuartmark@gmail.com"},{"name":"sioked","email":"sioked@gmail.com"}],"homepage":"https://github.com/krakenjs/zalgo-promise#readme","bugs":{"url":"https://github.com/krakenjs/zalgo-promise/issues"},"dist":{"shasum":"9166653c733fabf2c2dd38869a3543ef41426a80","tarball":"https://registry.npmjs.org/@krakenjs/zalgo-promise/-/zalgo-promise-3.0.0-alpha.1.tgz","fileCount":30,"integrity":"sha512-dLfmX46bF89G5tmbWStKm0ssqC39F8FdAsAx2/BI203t+fxaOS4GMUL/6qirTMc0uW1i2mpiivaHDqSgodx/Iw==","signatures":[{"sig":"MEUCIQCBGbk54aIlp/iVlDen2wMx5t7fGsEgLAETXvJ0EqgoYgIgLNSxFPUXKK5JS+klIC8eLK34XF04aNLfFQFKLQqSa5s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":117357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivyLfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmro7g//XcuRGCXiSwf7dg3ODMWcD5lWjXowEX9s/PUacOsmkLNNN+Tb\r\n9jMKYf0EiMxyyGkTVfR0hHUH9PVbUsYYE4locWz++yyWF9QngwkQ0WAoNexZ\r\n7g4XeGh+0wxwFUecn7m3WhEa/iLOYQX4PE9EFOTpcfjtqd56Owm659ZBl7XO\r\nVqyIdz3RYs8I1/q6/cchu7EIh33GvXK6c9/VGxYPC4RJDQikWy3RTyu3O6uW\r\nGK+mGGqpw4IFFxrCmM6wMtat06UyaK0RwRPSkjYG2o2j2DeXAycVXGu64Tmg\r\nSja6j9h2lBJgGy3tfAw8/8zUGtpV5kQHTkhbjrYWrPqGrkpE1TzfnP0t6/Cq\r\nV738By+JfeM4S9orH3ql8VO4/4Mknjv9IrGfhXl6jrxP3glPDUdlzxJgoVuK\r\nAQy3IXCgh10zxEC1orXod41vBtLbRveXi8zrq0FaZ5s0PH+YysqlhVisziRv\r\nkpgJPhT3tSU0ks+yOTorweIvWJQZD9hmBptW9Pi6LMPjf8WpGqv7I/s/dmj+\r\nWE50cmEM82TmSFVtrNvqLh6m9W3XkITFdMWkvQiYGjzZPFqYX5Ofis400zrB\r\nQEk56Z0zjBaZGxrhJkU2uT7NnPuYUJli3e/bGjzxRo7dPUTeM4Q+muj03NKt\r\n2U2hznJyOteh/aOb1tIUOjRm6Pp365H9vDk=\r\n=WGH+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","readme":"## zalgo-promise\n\n[![build status][build-badge]][build]\n[![code coverage][coverage-badge]][coverage]\n[![npm version][version-badge]][package]\n\n[build-badge]: https://img.shields.io/github/workflow/status/krakenjs/zalgo-promise/build?logo=github&style=flat-square\n[build]: https://github.com/krakenjs/zalgo-promise/actions?query=workflow%3Abuild\n[coverage-badge]: https://img.shields.io/codecov/c/github/krakenjs/zalgo-promise.svg?style=flat-square\n[coverage]: https://codecov.io/github/krakenjs/zalgo-promise/\n[version-badge]: https://img.shields.io/npm/v/zalgo-promise.svg?style=flat-square\n[package]: https://www.npmjs.com/package/zalgo-promise\n\nA promise library that does not automatically resolve promises asynchronously, unless you do so manually.\n\nhttps://medium.com/@bluepnume/intentionally-unleashing-zalgo-with-promises-ab3f63ead2fd\n\n### Quick Start\n\n`npm install --save zalgo-promise`\n\n#### Global\n\n```javascript\n<script src=\"zalgo-promise.js\"></script>\n<script>\n    new ZalgoPromise( ... );\n</script>\n```\n\n#### CommonJS\n\n```javascript\nvar ZalgoPromise = require('zalgo-promise');\n\nnew ZalgoPromise( ... );\n```\n\n#### ES6\n\n```javascript\nimport { ZalgoPromise } from 'zalgo-promise';\n\nnew ZalgoPromise( ... );\n```\n\n### Rationale\n\nPromises are asynchronous by default. This means that:\n\n```javascript\nPromise.resolve(\"foo\").then(function (result) {\n  console.log(result);\n});\n\nconsole.log(\"bar\");\n```\n\nWill log:\n\n```javascript\nbar;\nfoo;\n```\n\nEven if we don't do anything explicitly asynchronous in the promise, it becomes asynchronous by default.\n\nThis is, generally speaking, a good thing™\n\nHowever, this is a problem when:\n\n- You're using a browser which doesn't have native Promise support\n- You're using a Promise shim, which has to use `setTimeout()` to guarantee promises are resolved asynchronously\n- You need to deal with cases where the browser deprioritizes `setTimeout()`, for instance, you're in a popup window but still want to communicate with the parent window\n\nIn this case, any promises you run in the unfocused window will try to run `setTimeout()`, the browser will deprioritize those calls, and your code will hang.\n\nZalgoPromise attempts to resolve this problem by introducing promises which are not asynchronous by default, only if you explicitly do something asynchronous like an ajax call, a post-message, a setTimeout or something else.\n\n```javascript\nvar promise = new ZalgoPromise(function (resolve) {\n  resolve();\n});\n\npromise.then(function () {\n  // This function will be called *synchronously*\n});\n```\n\n```javascript\nvar promise = new ZalgoPromise(function (resolve) {\n  setTimeout(resolve, 100);\n});\n\npromise.then(function () {\n  // This function will be called *asynchronously*\n});\n```\n","gitHead":"39f936394ee515003cb45c0309ec9049e03c3328","scripts":{"flow":"flow","lint":"eslint src/ test/ *.js","test":"npm run format:check && npm run lint && npm run flow-typed && npm run flow && npm run karma","babel":"babel src/ --out-dir dist/esm","build":"npm run test && npm run babel && npm run webpack && npm run build:types","clean":"rimraf dist coverage","debug":"cross-env NODE_ENV=debug","karma":"cross-env NODE_ENV=test babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/karma start","setup":"npm install && npm run flow-typed","format":"prettier --write --ignore-unknown .","prepare":"husky install","release":"standard-version","webpack":"babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/webpack --display-optimization-bailout --progress","reinstall":"rimraf flow-typed && rimraf node_modules && npm install && flow-typed install","flow-typed":"flow-typed install","prerelease":"npm run clean && npm run build && git add dist && git commit -m 'ci: check in dist folder' || echo 'Nothing to distribute'","build:types":"gen-flow-files src --out-dir dist/esm","postrelease":"git push && git push --follow-tags && npm publish","format:check":"prettier --check ."},"_npmUser":{"name":"westeezy","email":"westin.wrzesinski@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0.html","type":"Apache 2.0"}],"repository":{"url":"git://github.com/krakenjs/zalgo-promise.git","type":"git"},"_npmVersion":"8.13.1","description":"Javascript module template.","directories":{},"lint-staged":{"*":"prettier --write --ignore-unknown"},"_nodeVersion":"16.14.0","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"husky":"^7.0.4","mocha":"^4","flow-bin":"0.155.0","prettier":"^2.6.2","lint-staged":"^12.4.0","gen-flow-files":"^0.4.11","@commitlint/cli":"^16.2.1","standard-version":"^9.3.2","@krakenjs/grumbler-scripts":"^7.0.0","@commitlint/config-conventional":"^16.2.1"},"standard-version":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","hidden":false},{"type":"docs","hidden":false},{"type":"style","hidden":false},{"type":"refactor","hidden":false},{"type":"perf","hidden":false},{"type":"test","hidden":false},{"type":"ci","hidden":true}]},"_npmOperationalInternal":{"tmp":"tmp/zalgo-promise_3.0.0-alpha.1_1656693471234_0.6818569214287817","host":"s3://npm-registry-packages"}},"3.0.0-typescript.1":{"name":"@krakenjs/zalgo-promise","version":"3.0.0-typescript.1","keywords":["template"],"_id":"@krakenjs/zalgo-promise@3.0.0-typescript.1","maintainers":[{"name":"gregjopa","email":"grjopa@gmail.com"},{"name":"sdk-integrations-npm","email":"sdk-integrations-npm@paypal.com"},{"name":"wsbrunson","email":"brunson.ws@gmail.com"},{"name":"westeezy","email":"westin.wrzesinski@gmail.com"},{"name":"mstuart","email":"stuartmark@gmail.com"},{"name":"sioked","email":"sioked@gmail.com"}],"homepage":"https://github.com/krakenjs/zalgo-promise#readme","bugs":{"url":"https://github.com/krakenjs/zalgo-promise/issues"},"dist":{"shasum":"7a998f31496716fc7f4dbba2147a92c6f5f7a47f","tarball":"https://registry.npmjs.org/@krakenjs/zalgo-promise/-/zalgo-promise-3.0.0-typescript.1.tgz","fileCount":25,"integrity":"sha512-hRQBR5149iSCOTTL79w7S4pvRiQlSahwpaRc6vvvnc95J/huLRR15v67DzoKA4YC8YmhE0tD1PcVjs+c4UN7UA==","signatures":[{"sig":"MEUCIAyY+wamgzoGHCce0W/zHdcwW4qE+QscAcbBZqQ/J8JEAiEA18984w4egKHDQypnnRTyL6dMj87qGW4YiHPPwAbcAMM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":113747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfVMmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIwhAAiYGuCCNmI1kcOJrJvrkq1uTjZhOhIKLqxTwrIvb2zmmhCEfo\r\nMs1lvO7mXRni8LCoPV4aILwcU66cE2LwuiSiENaZ2mMQ+w+eZ4nMYXIUDBpg\r\n019SN60vpnfo7Yq1Jq0FwZAez+Tnc3v/LEumhc5OT9bSdprMF88cOsVQk1fJ\r\nA5sFF7JzMjDZzGAc+CIv+XoI5qohpPpWAVPBjq4zFWBJ2tLOk0HHu8eG1ScR\r\nxbO28XJZrGeLx1FicrfWLVq1wU0SbRr87kuSOs/poJKX9MOgx4GuDwcxAk/x\r\n33+j73VGEFDvNXe/b2AUi8kffod/fSgJvumkUBOzXF8ugpTcUWa68UKBWEts\r\nt7Qhk2PwG8fTLc42OhK46MJBDQBXfPdm7LJantTVeA6k/mjjirUtfiduamY2\r\nPPRvkmmEBQ2SR1oWbjhW7jOx6DSmxXtwZuhHOnAtJ9a0D/p0EpWTrd5OL/0z\r\nEeJQpVwbqhnY/aewjN4GmAks9mN1QE74BmRttLecD53Bfp2fyIMYuKhd9JLG\r\n5TpnjCApu8DhJGqg0kGZiqmdM+dFcxyukLKW5nacowj7MPsimmOE1hgIawm2\r\nMEE+kqVAaFpA+hk1fO4JGaVU30zc/3WY7F6wdVbkSBQPP6jNezcYQOpoGNf6\r\n6PNhcxxWBTa8CpPHrutoYmofbX8Q2TAyMNk=\r\n=oicY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","readme":"## zalgo-promise\n\n[![build status][build-badge]][build]\n[![code coverage][coverage-badge]][coverage]\n[![npm version][version-badge]][package]\n\n[build-badge]: https://img.shields.io/github/workflow/status/krakenjs/zalgo-promise/build?logo=github&style=flat-square\n[build]: https://github.com/krakenjs/zalgo-promise/actions?query=workflow%3Abuild\n[coverage-badge]: https://img.shields.io/codecov/c/github/krakenjs/zalgo-promise.svg?style=flat-square\n[coverage]: https://codecov.io/github/krakenjs/zalgo-promise/\n[version-badge]: https://img.shields.io/npm/v/zalgo-promise.svg?style=flat-square\n[package]: https://www.npmjs.com/package/zalgo-promise\n\nA promise library that does not automatically resolve promises asynchronously, unless you do so manually.\n\nhttps://medium.com/@bluepnume/intentionally-unleashing-zalgo-with-promises-ab3f63ead2fd\n\n### Quick Start\n\n`npm install --save zalgo-promise`\n\n#### Global\n\n```javascript\n<script src=\"zalgo-promise.js\"></script>\n<script>\n    new ZalgoPromise( ... );\n</script>\n```\n\n#### CommonJS\n\n```javascript\nvar ZalgoPromise = require('zalgo-promise');\n\nnew ZalgoPromise( ... );\n```\n\n#### ES6\n\n```javascript\nimport { ZalgoPromise } from 'zalgo-promise';\n\nnew ZalgoPromise( ... );\n```\n\n### Rationale\n\nPromises are asynchronous by default. This means that:\n\n```javascript\nPromise.resolve(\"foo\").then(function (result) {\n  console.log(result);\n});\n\nconsole.log(\"bar\");\n```\n\nWill log:\n\n```javascript\nbar;\nfoo;\n```\n\nEven if we don't do anything explicitly asynchronous in the promise, it becomes asynchronous by default.\n\nThis is, generally speaking, a good thing™\n\nHowever, this is a problem when:\n\n- You're using a browser which doesn't have native Promise support\n- You're using a Promise shim, which has to use `setTimeout()` to guarantee promises are resolved asynchronously\n- You need to deal with cases where the browser deprioritizes `setTimeout()`, for instance, you're in a popup window but still want to communicate with the parent window\n\nIn this case, any promises you run in the unfocused window will try to run `setTimeout()`, the browser will deprioritize those calls, and your code will hang.\n\nZalgoPromise attempts to resolve this problem by introducing promises which are not asynchronous by default, only if you explicitly do something asynchronous like an ajax call, a post-message, a setTimeout or something else.\n\n```javascript\nvar promise = new ZalgoPromise(function (resolve) {\n  resolve();\n});\n\npromise.then(function () {\n  // This function will be called *synchronously*\n});\n```\n\n```javascript\nvar promise = new ZalgoPromise(function (resolve) {\n  setTimeout(resolve, 100);\n});\n\npromise.then(function () {\n  // This function will be called *asynchronously*\n});\n```\n","gitHead":"271090b217f05ea3368ae5d0ad878d3fb10bc6d6","scripts":{"flow":"flow","lint":"eslint src/ test/ *.js","test":"npm run format:check && npm run lint && npm run flow-typed && npm run flow && npm run karma","babel":"babel src/ --out-dir dist/module","build":"npm run test && npm run babel && npm run webpack","clean":"rimraf dist coverage","debug":"cross-env NODE_ENV=debug","karma":"cross-env NODE_ENV=test babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/karma start","setup":"npm install && npm run flow-typed","format":"prettier --write --ignore-unknown .","prepare":"husky install","release":"standard-version","webpack":"babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/webpack --progress","reinstall":"rimraf flow-typed && rimraf node_modules && npm install && flow-typed install","flow-typed":"flow-typed install","prerelease":"npm run clean && npm run build && git add dist && git commit -m 'ci: check in dist folder' || echo 'Nothing to distribute'","postrelease":"git push && git push --follow-tags && npm publish","format:check":"prettier --check ."},"_npmUser":{"name":"westeezy","email":"westin.wrzesinski@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0.html","type":"Apache 2.0"}],"repository":{"url":"git://github.com/krakenjs/zalgo-promise.git","type":"git"},"_npmVersion":"8.15.0","description":"Javascript module template.","directories":{},"lint-staged":{"*":"prettier --write --ignore-unknown"},"_nodeVersion":"16.17.0","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","husky":"^7.0.4","mocha":"^4","flow-bin":"0.155.0","prettier":"^2.6.2","cross-env":"^7.0.3","flow-typed":"^3.8.0","lint-staged":"^12.4.0","@commitlint/cli":"^16.2.1","standard-version":"^9.3.2","@krakenjs/grumbler-scripts":"^8.0.4","@commitlint/config-conventional":"^16.2.1"},"standard-version":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","hidden":false},{"type":"docs","hidden":false},{"type":"style","hidden":false},{"type":"refactor","hidden":false},{"type":"perf","hidden":false},{"type":"test","hidden":false},{"type":"ci","hidden":true}]},"_npmOperationalInternal":{"tmp":"tmp/zalgo-promise_3.0.0-typescript.1_1669157670044_0.7195654377396692","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-02-27T19:00:42.295Z","modified":"2026-09-29T18:53:46.557Z","1.0.48":"2022-02-27T19:00:42.549Z","2.0.0":"2022-02-27T20:22:16.065Z","2.0.1":"2022-02-27T21:53:36.465Z","3.0.0-alpha.1":"2022-07-01T16:37:51.594Z","3.0.0-typescript.1":"2022-11-22T22:54:30.223Z"},"bugs":{"url":"https://github.com/krakenjs/zalgo-promise/issues"},"homepage":"https://github.com/krakenjs/zalgo-promise#readme","keywords":["template"],"repository":{"url":"git://github.com/krakenjs/zalgo-promise.git","type":"git"},"description":"Javascript module template.","maintainers":[{"email":"dustijones@paypal.com","name":"dustijones"},{"email":"sdk-integrations-npm@paypal.com","name":"sdk-integrations-npm"},{"email":"grjopa@gmail.com","name":"gregjopa"},{"email":"sioked@gmail.com","name":"sioked"},{"email":"brunson.ws@gmail.com","name":"wsbrunson"},{"email":"ravi_shekhar00@yahoo.com","name":"ravishekhar00"}],"readme":"","readmeFilename":""}