{"name":"p-finally","version":"2.0.0","description":"`Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-finally.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["promise","finally","handler","function","async","await","promises","settled","ponyfill","polyfill","shim","bluebird"],"devDependencies":{"ava":"^1.4.1","xo":"^0.24.0"},"gitHead":"7ae963410de1754b565d2fd2b4ef581fef099bd3","bugs":{"url":"https://github.com/sindresorhus/p-finally/issues"},"homepage":"https://github.com/sindresorhus/p-finally#readme","_id":"p-finally@2.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Hh1x1SR9/Y5ndrziFD+dfB0N+chocV4uCmyzqshjN7fXj4kReUt5Fx+I50Eg9uUWml7g5gCYUzEHiselmnP3dg==","shasum":"b5bfd254f48358184552430fe55e968a83ccf593","tarball":"http://registry-npm.ywwl.com/p-finally/download/p-finally-2.0.0.tgz","fileCount":4,"unpackedSize":2918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7TxiCRA9TVsSAnZWagAAgMMP/R1+5JDq/rkvgdz67B4H\n0TTqgsu62jBFY15DCBlbUhOQY6D5IPgnmqXFtV2K8r39HmujB/Zui7CPvJnG\nj2Cw/nJSMGo1jSK6CST1uvEUe/5wqM2JV0RTs/115+pOrmQ59GtCpkECaDaJ\nBn68aOHeO66PjVVPznco+PTD2M53gOR0ufykta5Ws1i10GEO6o410x6DVGfG\nh9V51sE4As9ZOBjx1F81aelSgxbLQJoprgJtrTFq8IpMBdKfaHWHxEF4JS0T\nWoV1XJSliaoqaEYuR/8qulUgCrtaxZzW/uA37eNK7jyQkt/NA6SLay4l/Rsx\nwWfYsAI6AeupRdnfFQiWoV8b0/SvxBCpg9ILB6hNBgi/DZFSv+4jykxRnhh1\n29f+DcuUaYIMg+9bkHvK9WpaVPxPJqPeyQUCzWZkJZTjFq6T9UGLYKWTn0Y/\nALDAwjilbLSxAYVaAc7QoxbSbBPAin3Dil49Hu5R6Pvlt5jS6wYSDg+P7p03\nhjJIowjExuuCABqTAVeZKJyniMXnE3npJBukzmH20Qb3tOHTRv7LI6UIRw+X\nfw3+ZP1FfnD1eezeWqlz1WixNfl7mAyF2qlPDhdbz1DnOm+gZRToxt8KERIo\nJ5F5fLu9EXMQ82jOvTwzoRgKPj7CUf8hwjyoxZQWe/EzRWJ9nPNBat/SNdky\nhrNL\r\n=Eahz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCTZMtqyZ7+vUboTyNCb5D/2dwGeVJ7zPvKijM7kzmUAIhAP9aflvEJ5dUFOYqL7efbch3jeP02sGa4hJ+e5QLxGab"}],"size":1669,"noattachment":false,"key":"/p-finally/-/p-finally-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-finally_2.0.0_1559051362108_0.403046563273898"},"_hasShrinkwrap":false,"readme":"# p-finally\n\n> [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome\n\nUseful for cleanup.\n\n## Install\n\n```\n$ npm install p-finally\n```\n\n## Usage\n\n```js\nimport pFinally from 'p-finally';\n\nconst directory = createTempDirectory();\n\nawait pFinally(write(directory), () => {\n\tcleanup(directory);\n});\n```\n\n## API\n\n### pFinally(promise, onFinally?)\n\nReturns a `Promise`.\n\n#### onFinally\n\nType: `Function`\n\nNote: Throwing or returning a rejected promise will reject `promise` with the rejection reason.\n\n## Related\n\n- [p-try](https://github.com/sindresorhus/p-try) - `Promise.try()` ponyfill - Starts a promise chain\n- [More…](https://github.com/sindresorhus/promise-fun)\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-p-finally?utm_source=npm-p-finally&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","publish_time":1559051362238,"_cnpm_publish_time":1559051362238,"dist-tags":{"latest":"3.0.0"}}