{"name":"p-finally","version":"1.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":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","finally","handler","function","async","await","promises","settled","ponyfill","polyfill","shim","bluebird"],"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"9cfdd5dccb41995300916c17ab0fab784800f4d3","bugs":{"url":"https://github.com/sindresorhus/p-finally/issues"},"homepage":"https://github.com/sindresorhus/p-finally#readme","_id":"p-finally@1.0.0","_shasum":"3fbcfb15b899a44123b34b6dcc18b724336a2cae","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"3fbcfb15b899a44123b34b6dcc18b724336a2cae","tarball":"http://registry-npm.ywwl.com/p-finally/download/p-finally-1.0.0.tgz","integrity":"sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE82KcJe5EKCinYh0326F2tFW8tpEbRpsNFtI0Alrr72AiBKW7Fa0Z0Fc/p03b+9HuPnYAVscEeDFOlOuuoyg/fpMQ=="}],"size":1754,"noattachment":false,"key":"/p-finally/-/p-finally-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/p-finally-1.0.0.tgz_1477029729610_0.2481102051679045"},"directories":{},"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":1477029729848,"_cnpm_publish_time":1477029729848,"dist-tags":{"latest":"3.0.0"}}