{"_id":"make-cancellable-promise","_rev":"9-375561a4a2a9434e9b0ac6d0a735c7cd","name":"make-cancellable-promise","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"make-cancellable-promise","version":"1.0.0","keywords":["promise","promise-cancelling"],"author":{"name":"Wojciech Maj","email":"kontakt@wojtekmaj.pl"},"license":"MIT","_id":"make-cancellable-promise@1.0.0","maintainers":[{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"}],"dist":{"shasum":"826214115b0827ca7a45ba204df7c31546243870","tarball":"https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.0.0.tgz","fileCount":9,"integrity":"sha512-+YO6Grg2uy/z8Mv3uV90OP6yAUHIF43YGgEFbejmBrK9VWFsVO6DvzFMcopXr9wCNg3/QIltIKiSCROC7zFB2g==","signatures":[{"sig":"MEUCIQDoet2GZA/x5F9gvz6DZKDBX867z3bQmp88t1c2EAuzFQIgSa6vx2txh6aICH/KyWv67p+Oj1eoXVPB2GoEzWPkjV8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLwk0CRA9TVsSAnZWagAACBkQAIBRMgIE38KSEsGfDTjY\nc0+eWbR383ZF7A8bSukURElsC45Gle2fIpC+gvggvcfoeumz0lwIP4CwYDZ0\n5F2fSmgfV6Ks0RVrBJ/dfMk5l3yxcuOpviWQbCtkaQoFfP69gIwxjJzZayAt\nZdJAN4MaULE0wcfM03Em/8mwvTI7SYHH6bJG8Cpbyl0ZFaEni5O78M9/OiP1\nnYeskK0gzRRFDZgfFADWBCReZxei3K82EHRYmopdM5RI8oyMAWS6oRBt5lZw\nL4+3n/aIoVV2Afen5VBJjP/Fq51kytoDWj9MBzCClwTo2J7t0QQw73NQV2w6\nt1ThQAonzA6Xw/62BqdSOofn5aFcmr/9sL0T2FpeNIz9OeRIIN1nV6xDWXU1\nlKeNHyGLW7EEcJZbs5iDvMR156Djp+aTMtmDkr75FHZjzuFsafJFVsqKf5yP\nkDBY7hrxP0/jsAM9NbA4ehWT3ay/eexGQg4B4B80azN1w6La2bOKluWzgIF8\nt2S5Hr4j3gEjXtlbLkUcJAAkFo5kcR2HGeovLOwH7BZSfn14h6nO7ei7cnJt\nylgYoIm1hMPpN0OMpgPD15qaq8/dULCw1yAUsOXJzlLTYlFYMgnmTu3sYWbM\nosuVHskMaB94AspvfCt9QXnTcrHnzBSib8xzfhKMmccpwk5uXDhoZVb8fukX\nCf1/\r\n=Yc9D\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{},"main":"dist/index.js","source":"src/index.js","scripts":{"jest":"jest","lint":"eslint src/ --ext .jsx,.js","test":"yarn lint && yarn jest","build":"babel src -d dist --ignore **/__tests__,**/*.spec.js","clean":"rimraf dist","jest-coverage":"jest --coverage","prepublishOnly":"yarn clean && yarn build"},"_npmUser":{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"},"repository":{"url":"https://github.com/wojtekmaj/make-cancellable-promise.git","type":"git"},"description":"Make any Promise cancellable.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2019 Wojciech Maj\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"jest":"^24.8.0","eslint":"^5.16.0","rimraf":"^2.6.3","@babel/cli":"^7.5.0","@babel/core":"^7.5.0","@babel/preset-env":"^7.5.0","eslint-plugin-import":"^2.18.0","eslint-config-airbnb-base":"^13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/make-cancellable-promise_1.0.0_1563363636094_0.3400210026005539","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"make-cancellable-promise","version":"1.1.0","keywords":["promise","promise-cancelling"],"author":{"name":"Wojciech Maj","email":"kontakt@wojtekmaj.pl"},"license":"MIT","_id":"make-cancellable-promise@1.1.0","maintainers":[{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"}],"dist":{"shasum":"b4e9fcb31db3a27417e44f80cffa598ec9ac9f4e","tarball":"https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.1.0.tgz","fileCount":7,"integrity":"sha512-X5Opjm2xcZsOLuJ+Bnhb4t5yfu4ehlA3OKEYLtqUchgVzL/QaqW373ZUVxVHKwvJ38cmYuR4rAHD2yUvAIkTPA==","signatures":[{"sig":"MEUCID7csMR6A8IaRcdKMtBtOuomqLJ0mlBZ+AMlF5h+enXaAiEAwpevzthfKzMZ5+uwj5a4O3sO3eafQI269wXDQ1XLqOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP8VPCRA9TVsSAnZWagAAu30P/1FjxB71Rh+drGFZ6lNJ\nplmd5mFcsyRFAOGCCI1PwG8u3Uqw9yrLIvHputBauZGj6iU798t7F9Bp44Vt\nxmgKjQh7O6bilRrXg0JQcrNW/dE/sJhkz2EFVlUiq8T9NUcOtcYOfWs20Cj0\nbRNqzG9wS+8cljuiiTWGJhHZeguCYHODs5HUWh2lHBCztblrScIWp+zVDOnZ\nI2NNUKdnkwPl2AxaceLpIzt0zqbSosZve85jX9cnXAysTmTzHh+PIY2MXVmn\niLYBCLVvPucIO+A/fuRI0yzoMnl6pA/dbWsLv2Ipz/7dTSKyEQ3WqxrtoZm/\n3vBtYd7uVHJRgTyEr2bRZoH4Z+wOikzNBG6383vaMqskpEa8keVm21nQ4oos\nQg0fzRhr0UIYayqlCjV/BJFnxmOu8gGDmUVlwwx0XRJ40EwJfLI00kv6uXXX\nHWgJ96A5rrOKj0SshraK/JiqDotfoON2aLRYHHWhEe5dEdB86sUmnjSk6Z1+\nbOaWGBprNEKxv2+cdFIe9fUzfo+zt90dLRmJMowrMlMiXh69+Ph8Av6G0GnT\njjXXeHh1WkQs0AnwS/uBn7qp8seQMyETfcYWswaTjFXeCgacT2kZ3AwRoLjc\nFnoBs0A7M2UwC+VwHGkciKhDFF2KZi40I7sb/ZQqKeDih3yJ72I18oykbA8M\nk56a\r\n=rzW1\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{},"main":"dist/umd/index.js","module":"dist/esm/index.js","source":"src/index.js","funding":"https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1","scripts":{"jest":"jest","lint":"eslint src/ --ext .jsx,.js","test":"yarn lint && yarn jest","build":"yarn build-esm && yarn build-umd","clean":"rimraf dist","prepack":"yarn clean && yarn build","build-esm":"BABEL_ENV=production-esm babel src -d dist/esm --ignore \"**/*.spec.js\"","build-umd":"BABEL_ENV=production-umd babel src -d dist/umd --ignore \"**/*.spec.js\"","jest-coverage":"jest --coverage"},"_npmUser":{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"},"repository":{"url":"https://github.com/wojtekmaj/make-cancellable-promise.git","type":"git"},"description":"Make any Promise cancellable.","directories":{},"resolutions":{"semver@7.0.0":"^7.0.0"},"sideEffects":false,"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.0","eslint":"~7.19.0","rimraf":"^3.0.0","@babel/cli":"^7.8.0","@babel/core":"^7.9.0","@babel/preset-env":"^7.9.0","eslint-config-wojtekmaj":"^0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/make-cancellable-promise_1.1.0_1631569231070_0.503243073019142","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"make-cancellable-promise","version":"1.2.0","keywords":["promise","promise-cancelling"],"author":{"name":"Wojciech Maj","email":"kontakt@wojtekmaj.pl"},"license":"MIT","_id":"make-cancellable-promise@1.2.0","maintainers":[{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"}],"dist":{"shasum":"a71ce4d000e9f3b26dab95dcc39947506440e792","tarball":"https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.2.0.tgz","fileCount":9,"integrity":"sha512-sLhwwkWNAtPpvYh1Yen8QRMm6tRReFsheUri2muqIrZEDwEHBPAsQeAD5ezZ4F7wjdmttoZL+w/BDkgmvOQSsA==","signatures":[{"sig":"MEQCICKoqk8qup77UdOIxCgz+KsFHC3ddAVius2PAQ6H+OS8AiADvGMuq+74rtONDZvvj0MzdC04eiLud9SRiRge2UXJCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvQ/6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqjXA//YWLgMp9UwAFSdlvuOrEYSU3RV3ocOOWm5+8NWsjrDvdY8y/c\r\nC7+LrU4zs6Ls9cKl2nodIJOF8Vo164fwgTHVTzOQsLzPCG2AzGJTo3juQh2B\r\n6/4KOOBM8ZWMJc6gpDZ14kHopATjG1NqbtvqYZvw0ga5OIo7YlQLFAfQ5u6Q\r\nzRB5xwOpATen2IkT7q6zkLNrQ2tV1yrWnjtWymkp9bcbILU3VbXjJ9cYdS8G\r\nqfCuuEUQ0Rj/OkMuFXa7IGjFf/1dPItGIVi0cwsivf/My9ag/hCGrmO6rlaZ\r\n7NjKrZWYOjL9VDEurtDYaIGuHTzm7TtIP24RRJ3azyi3uyDZTZs8RMfCRH8x\r\nCUIlSZN+nVnYJ6/OQA00oa14Dui2YvpqkZ+59X2pq8tqTe3unc+eiPFUXT8c\r\nMvQFZd4VuigLR5aTUCK4swvqIFjuKeXTmvv1NHGMfkZ5fLLEpy5xb7OkEK08\r\nYHi5aS0Modi3+2w/FCd4ZNYXisxXciL+lHG0WlLOFpd90iq42zU87t28coPp\r\nurMuWIVIpeN8YRY7+zuFn1C/7BWHE1lURjj3XtypFB1ON8U1zbgNOnNgYv09\r\npdmalU9BTnGVNagUFM/gJC7jQLxp7hFsu7MBsPL9rej5LJzZsBzi4oVeUOcY\r\nftoAsuw3emEkiinvJF43ig0cR12IxJJnvtI=\r\n=Y97r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"src/index.ts","module":"dist/esm/index.js","source":"src/index.ts","funding":"https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1","gitHead":"13fc5ef2750ed3d3a31a633c9dd523e68be69d2b","scripts":{"tsc":"tsc --noEmit","jest":"jest","lint":"eslint src","test":"yarn lint && yarn tsc && yarn prettier && yarn jest","build":"yarn build-esm && yarn build-cjs","clean":"rimraf dist","prepack":"yarn clean && yarn build","prettier":"prettier --check . --cache","build-cjs":"tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs","build-esm":"tsc --project tsconfig.build.json --outDir dist/esm --module esnext"},"_npmUser":{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"},"repository":{"url":"https://github.com/wojtekmaj/make-cancellable-promise.git","type":"git"},"description":"Make any Promise cancellable.","directories":{},"resolutions":{"semver@7.0.0":"^7.0.0"},"sideEffects":false,"_hasShrinkwrap":false,"packageManager":"yarn@3.1.0","devDependencies":{"jest":"^29.0.0","husky":"^8.0.0","eslint":"^8.26.0","rimraf":"^3.0.0","prettier":"^2.7.0","typescript":"^4.9.4","@babel/core":"^7.15.0","@types/jest":"^29.0.0","pretty-quick":"^3.1.0","@babel/preset-env":"^7.15.0","eslint-config-wojtekmaj":"^0.7.1","@babel/preset-typescript":"^7.18.6","@typescript-eslint/parser":"^5.44.0","@typescript-eslint/eslint-plugin":"^5.41.0"},"_npmOperationalInternal":{"tmp":"tmp/make-cancellable-promise_1.2.0_1673334778788_0.7783870042345262","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"make-cancellable-promise","version":"1.2.1","keywords":["promise","promise-cancelling"],"author":{"name":"Wojciech Maj","email":"kontakt@wojtekmaj.pl"},"license":"MIT","_id":"make-cancellable-promise@1.2.1","maintainers":[{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"}],"dist":{"shasum":"b644fbc1ead91ef4968ac63da762476a462732ac","tarball":"https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.2.1.tgz","fileCount":9,"integrity":"sha512-nigEn7brgUhjUb2lEobWUW4ZiJdIZ/Wct0UsmDsqaZhgLMvY1OC6FGLa/5SU2RvnyuilkjM7g5JGxt6CJZQGNw==","signatures":[{"sig":"MEYCIQDiZWboI0lMlqZewq/PxMnq9cDu4PQz895BwP44/RA4VQIhAJVVhUKy2J4pVI/IHJnxPQPubtr6ZPleETPB0lmHYp/e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj23N+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIkA/+JMt2fEzPpGh3BptxtfPzLd+99z91bPWaNNw2L7vYbUNrQuqV\r\nymqHHcIy523H1Foqc0ElsTBZz1l8Db2tVBJ6FIN+Iq5I+huMTaK5tbZpHLon\r\nLbqvzs1Q4Hl5eJSUrPXzD73TCzsc5j0Lj+8uZMdT9rxapfFEWzkqBAzCHLyp\r\nSaJsUjpUaUV3riEHN46h46zECRD+l6KFxO4V9g7aSIFPoYoL7toE+O/QnGqn\r\nUn1mk8lME25k6Jx40iJY549yYvRWFKvxck9LgoLXFHORsqcr8W66cxyRyQIn\r\nQHbKr0arIA8sWdU+q+ZtXrU2q1hPM9dF6GDI1IWDyV+jZjHsqy7aUf9hlZIV\r\nsT6ztsbIg//UzsEdDFRyU+gsQ/HtwARb3j5FyxL3qdPk03vCRCUqu1dhMlKt\r\n5LUzbH/1c/CEeNy9lZEaqnZfXnkaOWK3Jq+tWw8g/hpsFchErqsgu2kmDvfP\r\n9d6GFpynv8u7o4X4I7WYg4ofYJQs6bEtUuoArwppwY2JB0KzRErxFJTzTflo\r\nXGhiBGAE8EZa3l2d+uR8raEtSYDk4hrQJjddeIZXEc34CotwtyIbcVKDyBzp\r\nQdmF36Q5qILytEWqqKXr/MXBG0me8I1subATxert5A0mkAs5qDtcmNSqK9jY\r\nyfWLU7VUf2vm1oxCzxhPHnM/WUeS9sKykmQ=\r\n=jroh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/cjs/index.d.ts","module":"dist/esm/index.js","source":"src/index.ts","funding":"https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1","gitHead":"de03f6afab63e099a415b111def7e950a8f24ad4","scripts":{"tsc":"tsc --noEmit","jest":"jest","lint":"eslint src","test":"yarn lint && yarn tsc && yarn prettier && yarn jest","build":"yarn build-esm && yarn build-cjs","clean":"rimraf dist","prepack":"yarn clean && yarn build","prettier":"prettier --check . --cache","build-cjs":"tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs","build-esm":"tsc --project tsconfig.build.json --outDir dist/esm --module esnext"},"_npmUser":{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"},"repository":{"url":"https://github.com/wojtekmaj/make-cancellable-promise.git","type":"git"},"description":"Make any Promise cancellable.","directories":{},"resolutions":{"semver@7.0.0":"^7.0.0"},"sideEffects":false,"_hasShrinkwrap":false,"packageManager":"yarn@3.1.0","devDependencies":{"jest":"^29.0.0","husky":"^8.0.0","eslint":"^8.26.0","rimraf":"^3.0.0","prettier":"^2.7.0","typescript":"^4.9.4","@babel/core":"^7.15.0","@types/jest":"^29.0.0","pretty-quick":"^3.1.0","@babel/preset-env":"^7.15.0","eslint-config-wojtekmaj":"^0.7.1","@babel/preset-typescript":"^7.18.6","@typescript-eslint/parser":"^5.44.0","@typescript-eslint/eslint-plugin":"^5.41.0"},"_npmOperationalInternal":{"tmp":"tmp/make-cancellable-promise_1.2.1_1675326333827_0.29707729804066396","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"make-cancellable-promise","version":"1.3.0","keywords":["promise","promise-cancelling"],"author":{"name":"Wojciech Maj","email":"kontakt@wojtekmaj.pl"},"license":"MIT","_id":"make-cancellable-promise@1.3.0","maintainers":[{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"}],"dist":{"shasum":"109dd373eb6a2b0e1e04af9c8ced3b3f58c97a05","tarball":"https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.3.0.tgz","fileCount":9,"integrity":"sha512-vAn4swnmOc4Yl8wak7j5WG9rSbMJx+N3u5fpMsS8Xwql5hxpLuZbSuneWTVxO2PCVq8JXMZ1egZAbxs6gDuFuQ==","signatures":[{"sig":"MEYCIQDxElV/fWvgnaKcmNjuHezPYEywskpXUK269r5dhjlZUQIhAPKDeJipEOb3Pe9PYRsCgHBYJTBIsXifnlJFCqCG8nkK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8584},"main":"./dist/cjs/index.js","type":"module","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","source":"./src/index.ts","exports":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"funding":"https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1","gitHead":"297947477b5247593b1beb76cccb8b956d4628b8","scripts":{"tsc":"tsc --noEmit","lint":"eslint .","test":"yarn lint && yarn tsc && yarn prettier && yarn unit","unit":"vitest run","build":"yarn build-esm && yarn build-cjs","clean":"rimraf dist","prepack":"yarn clean && yarn build","prettier":"prettier --check . --cache","build-cjs":"tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs","build-esm":"tsc --project tsconfig.build.json --outDir dist/esm --module esnext"},"_npmUser":{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"},"repository":{"url":"https://github.com/wojtekmaj/make-cancellable-promise.git","type":"git"},"description":"Make any Promise cancellable.","directories":{},"sideEffects":false,"_hasShrinkwrap":false,"packageManager":"yarn@3.1.0","devDependencies":{"husky":"^8.0.0","eslint":"^8.26.0","rimraf":"^3.0.0","vitest":"^0.30.1","prettier":"^2.7.0","typescript":"^5.0.0","pretty-quick":"^3.1.0","eslint-config-wojtekmaj":"^0.8.4"},"_npmOperationalInternal":{"tmp":"tmp/make-cancellable-promise_1.3.0_1685369389467_0.0007281799760125995","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"make-cancellable-promise","version":"1.3.1","keywords":["promise","promise-cancelling"],"author":{"name":"Wojciech Maj","email":"kontakt@wojtekmaj.pl"},"license":"MIT","_id":"make-cancellable-promise@1.3.1","maintainers":[{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"}],"dist":{"shasum":"3bd89704c75afe6251cdd6a82baca1fcfbd2c792","tarball":"https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.3.1.tgz","fileCount":10,"integrity":"sha512-DWOzWdO3xhY5ESjVR+wVFy03rpt0ZccS4bunccNwngoX6rllKlMZm6S9ZnJ5nMuDDweqDMjtaO0g6tZeh+cCUA==","signatures":[{"sig":"MEQCIGbum+CD4ELqvRCssp7YNev8NBaF7qHdTPFpyr0HNwULAiBg9FyZKX9cG3+O/V+rl5h0NghQFsBVxckcPRQkkpS4/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8678},"main":"./dist/cjs/index.js","type":"module","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","source":"./src/index.ts","exports":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"funding":"https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1","gitHead":"a68efc0e74fa837b18c30699e958d9d87a24a280","scripts":{"tsc":"tsc --noEmit","lint":"eslint .","test":"yarn lint && yarn tsc && yarn prettier && yarn unit","unit":"vitest run","build":"yarn build-esm && yarn build-cjs","clean":"rimraf dist","prepack":"yarn clean && yarn build","prettier":"prettier --check . --cache","build-cjs":"tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs && echo '{\n  \"type\": \"commonjs\"\n}' > dist/cjs/package.json","build-esm":"tsc --project tsconfig.build.json --outDir dist/esm --module esnext"},"_npmUser":{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"},"repository":{"url":"https://github.com/wojtekmaj/make-cancellable-promise.git","type":"git"},"description":"Make any Promise cancellable.","directories":{},"sideEffects":false,"_hasShrinkwrap":false,"packageManager":"yarn@3.1.0","devDependencies":{"husky":"^8.0.0","eslint":"^8.26.0","rimraf":"^3.0.0","vitest":"^0.30.1","prettier":"^2.7.0","typescript":"^5.0.0","pretty-quick":"^3.1.0","eslint-config-wojtekmaj":"^0.8.4"},"_npmOperationalInternal":{"tmp":"tmp/make-cancellable-promise_1.3.1_1685381185114_0.493868532045211","host":"s3://npm-registry-packages"}},"1.3.2":{"name":"make-cancellable-promise","version":"1.3.2","keywords":["promise","promise-cancelling"],"author":{"name":"Wojciech Maj","email":"kontakt@wojtekmaj.pl"},"license":"MIT","_id":"make-cancellable-promise@1.3.2","maintainers":[{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"}],"homepage":"https://github.com/wojtekmaj/make-cancellable-promise#readme","bugs":{"url":"https://github.com/wojtekmaj/make-cancellable-promise/issues"},"dist":{"shasum":"993c8c8b79cff13c74fa93de0bd8a17fe66685c1","tarball":"https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.3.2.tgz","fileCount":10,"integrity":"sha512-GCXh3bq/WuMbS+Ky4JBPW1hYTOU+znU+Q5m9Pu+pI8EoUqIHk9+tviOKC6/qhHh8C4/As3tzJ69IF32kdz85ww==","signatures":[{"sig":"MEUCIQDVntEOPPLtmxjyFxRjl/BIyiAfOYNYOLRqcWTiDM2zDwIgG8lQjwsUBp/xGBdN/5bgGpjALNJA0gn230vUNcxn4Bo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/make-cancellable-promise@1.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":9104},"main":"./dist/cjs/index.js","type":"module","_from":"file:package.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","source":"./src/index.ts","exports":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"funding":"https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1","scripts":{"tsc":"tsc --noEmit","lint":"eslint .","test":"yarn lint && yarn tsc && yarn prettier && yarn unit","unit":"vitest","build":"yarn build-esm && yarn build-cjs && yarn build-cjs-package","clean":"rimraf dist","prepack":"yarn clean && yarn build","prettier":"prettier --check . --cache","build-cjs":"tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs --verbatimModuleSyntax false","build-esm":"tsc --project tsconfig.build.json --outDir dist/esm","build-cjs-package":"echo '{\n  \"type\": \"commonjs\"\n}' > dist/cjs/package.json"},"_npmUser":{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"},"_resolved":"/home/runner/work/make-cancellable-promise/make-cancellable-promise/package.tgz","_integrity":"sha512-GCXh3bq/WuMbS+Ky4JBPW1hYTOU+znU+Q5m9Pu+pI8EoUqIHk9+tviOKC6/qhHh8C4/As3tzJ69IF32kdz85ww==","repository":{"url":"git+https://github.com/wojtekmaj/make-cancellable-promise.git","type":"git"},"_npmVersion":"10.1.0","description":"Make any Promise cancellable.","directories":{},"sideEffects":false,"_nodeVersion":"20.8.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"packageManager":"yarn@3.1.0","devDependencies":{"husky":"^8.0.0","eslint":"^8.26.0","rimraf":"^3.0.0","vitest":"^0.34.0","prettier":"^3.0.0","typescript":"^5.0.0","lint-staged":"^14.0.0","eslint-config-wojtekmaj":"^0.9.0"},"_npmOperationalInternal":{"tmp":"tmp/make-cancellable-promise_1.3.2_1697635367813_0.5928588901411476","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"make-cancellable-promise","version":"2.0.0","description":"Make any Promise cancellable.","type":"module","sideEffects":false,"main":"./dist/index.js","source":"./src/index.ts","types":"./dist/index.d.ts","exports":{".":"./dist/index.js","./*":"./*"},"scripts":{"build":"tsc --project tsconfig.build.json","clean":"rimraf dist","format":"biome format","lint":"biome lint","prepack":"yarn clean && yarn build","test":"yarn lint && yarn tsc && yarn format && yarn unit","tsc":"tsc","unit":"vitest"},"keywords":["promise","promise-cancelling"],"author":{"name":"Wojciech Maj","email":"kontakt@wojtekmaj.pl"},"license":"MIT","devDependencies":{"@biomejs/biome":"1.9.0","husky":"^9.0.0","rimraf":"^6.0.0","typescript":"^5.5.2","vitest":"^3.0.5"},"publishConfig":{"access":"public","provenance":true},"repository":{"type":"git","url":"git+https://github.com/wojtekmaj/make-cancellable-promise.git"},"funding":"https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1","packageManager":"yarn@4.3.1","_id":"make-cancellable-promise@2.0.0","bugs":{"url":"https://github.com/wojtekmaj/make-cancellable-promise/issues"},"homepage":"https://github.com/wojtekmaj/make-cancellable-promise#readme","_integrity":"sha512-3SEQqTpV9oqVsIWqAcmDuaNeo7yBO3tqPtqGRcKkEo0lrzD3wqbKG9mkxO65KoOgXqj+zH2phJ2LiAsdzlogSw==","_resolved":"/home/runner/work/make-cancellable-promise/make-cancellable-promise/package.tgz","_from":"file:package.tgz","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-3SEQqTpV9oqVsIWqAcmDuaNeo7yBO3tqPtqGRcKkEo0lrzD3wqbKG9mkxO65KoOgXqj+zH2phJ2LiAsdzlogSw==","shasum":"d582b3ea435205e31653dead33a10bea0696c2fa","tarball":"https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-2.0.0.tgz","fileCount":7,"unpackedSize":7640,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/make-cancellable-promise@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDftgxxeec3bqPDzn3k4+pMjC7FUy6rXDZWIiV6qx35awIgA9rHeMP+fpAtwAMGq2wKVvQjqBz1gJbNg93/zLBEnvI="}]},"_npmUser":{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"},"directories":{},"maintainers":[{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/make-cancellable-promise_2.0.0_1742512040197_0.47018152869786123"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-17T11:40:36.094Z","modified":"2025-03-20T23:07:20.727Z","1.0.0":"2019-07-17T11:40:36.240Z","1.1.0":"2021-09-13T21:40:31.283Z","1.2.0":"2023-01-10T07:12:58.943Z","1.2.1":"2023-02-02T08:25:34.093Z","1.3.0":"2023-05-29T14:09:49.662Z","1.3.1":"2023-05-29T17:26:25.293Z","1.3.2":"2023-10-18T13:22:48.088Z","2.0.0":"2025-03-20T23:07:20.366Z"},"bugs":{"url":"https://github.com/wojtekmaj/make-cancellable-promise/issues"},"author":{"name":"Wojciech Maj","email":"kontakt@wojtekmaj.pl"},"license":"MIT","homepage":"https://github.com/wojtekmaj/make-cancellable-promise#readme","keywords":["promise","promise-cancelling"],"repository":{"type":"git","url":"git+https://github.com/wojtekmaj/make-cancellable-promise.git"},"description":"Make any Promise cancellable.","maintainers":[{"name":"wojtekmaj","email":"kontakt@wojtekmaj.pl"}],"readme":"[![npm](https://img.shields.io/npm/v/make-cancellable-promise.svg)](https://www.npmjs.com/package/make-cancellable-promise) ![downloads](https://img.shields.io/npm/dt/make-cancellable-promise.svg) [![CI](https://github.com/wojtekmaj/make-cancellable-promise/actions/workflows/ci.yml/badge.svg)](https://github.com/wojtekmaj/make-cancellable-promise/actions)\n\n# Make-Cancellable-Promise\n\nMake any Promise cancellable.\n\n## tl;dr\n\n- Install by executing `npm install make-cancellable-promise` or `yarn add make-cancellable-promise`.\n- Import by adding `import makeCancellablePromise from 'make-cancellable-promise`.\n- Do stuff with it!\n  ```ts\n  const { promise, cancel } = makeCancellablePromise(myPromise);\n  ```\n\n## User guide\n\n### makeCancellablePromise(myPromise)\n\nA function that returns an object with two properties:\n\n`promise` and `cancel`. `promise` is a wrapped around your promise. `cancel` is a function which stops `.then()` and `.catch()` from working on `promise`, even if promise passed to `makeCancellablePromise` resolves or rejects.\n\n#### Usage\n\n```ts\nconst { promise, cancel } = makeCancellablePromise(myPromise);\n```\n\nTypically, you'd want to use `makeCancellablePromise` in React components. If you call `setState` on an unmounted component, React will throw an error.\n\nHere's how you can use `makeCancellablePromise` with React:\n\n```tsx\nfunction MyComponent() {\n  const [status, setStatus] = useState('initial');\n\n  useEffect(() => {\n    const { promise, cancel } = makeCancellable(fetchData());\n\n    promise.then(() => setStatus('success')).catch(() => setStatus('error'));\n\n    return () => {\n      cancel();\n    };\n  }, []);\n\n  const text = (() => {\n    switch (status) {\n      case 'pending':\n        return 'Fetching…';\n      case 'success':\n        return 'Success';\n      case 'error':\n        return 'Error!';\n      default:\n        return 'Click to fetch';\n    }\n  })();\n\n  return <p>{text}</p>;\n}\n```\n\n## License\n\nThe MIT License.\n\n## Author\n\n<table>\n  <tr>\n    <td >\n      <img src=\"https://avatars.githubusercontent.com/u/5426427?v=4&s=128\" width=\"64\" height=\"64\" alt=\"Wojciech Maj\">\n    </td>\n    <td>\n      <a href=\"https://github.com/wojtekmaj\">Wojciech Maj</a>\n    </td>\n  </tr>\n</table>\n","readmeFilename":"README.md"}