{"name":"p-finally","version":"3.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"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava"},"keywords":["promise","finally","handler","function","async","await","promises","settled","ponyfill","polyfill","shim","bluebird"],"devDependencies":{"ava":"^3.15.0","xo":"^0.38.2"},"gitHead":"b8eb23a4415e988f2c346bcda74efb7dd3ab8e17","bugs":{"url":"https://github.com/sindresorhus/p-finally/issues"},"homepage":"https://github.com/sindresorhus/p-finally#readme","_id":"p-finally@3.0.0","_nodeVersion":"15.12.0","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-zvzo4d4xg+IQiZTakibWdwAh+LDYqM/iJO18lwtWbMyDOnOBIWY+AMDvOrP4eQshuCKXRi9R9CTXWFh4R0wOEw==","shasum":"9f094842ed5c89c2088d783d7cdc644bdc49345a","tarball":"http://registry-npm.ywwl.com/p-finally/download/p-finally-3.0.0.tgz","fileCount":4,"unpackedSize":3320,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb+lPCRA9TVsSAnZWagAAbxsP/3eEPTSOtOFD484AtLC0\n0NOwprjWsU/4MEqUE3QmjoGYOXw4WauMinKgML0PPsPF7CoX8fS4KC5Lf568\nwOY1NgcpjV48HgeaqEk7cc0lMWYJdt3V9IQ0VL6SmsR7+9ED6jnSon/6yxyh\npwFvcnM/WydtPqNdCVJXwd3WYaYulcp7fa/CVViQQfd90Qs4a2bQX5rkq4EC\n6kz9ucMpJdu3rWOck/VWz+1EfnQAtkvxdvw6SEjdlOqThcUgA7ev4qVS6xWD\nYkyudwgK9MbX4psC3+Jnjk0GyZvbhyqQzarSi6EOK5EbiNL3mrJqVClk2RAT\n+Md2GKOq7TlNQ/4ZnIY9l8Ox+jy1VCox+r3HSdmUQ3l07oPz0SBQdHy0DRqz\nrhoTASsS6DBXA9hdpQSs2hh8savcrvr4VavvjTjE0UElO9enDjf35zvSet08\n0Ue73E25ZQxk4raxMTKaq3tflVu2WKxXw/DfIejIYsACSCwEt5oK2J5Hn+l/\nkVNpH97oNROlRWm163/QTJH5OYUtfRSGMCTlE03ErF0BP6MQTio2oQIuNcBS\nyG4MseAtqA8ZVqhyAhK+v1m62eI7L36m+8xQoULvd0p/el4de8z2+kW2mDdj\nDzPB3ANl5fafzCFwKTYpb5u9NZ08X2Osf/h4kDyv5gZOfIn1gG7xsQxeJxXz\nRUGU\r\n=U67H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBcbzgt0YVM3nTN7u4ZOyJOfHP7OrGCwy0rnLx7hUZVcAiASEdeUnqDzzoghCQ91KQJvSahHw49ySHH5KN2N1KqvKw=="}],"size":1896,"noattachment":false,"key":"/p-finally/-/p-finally-3.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-finally_3.0.0_1617946958932_0.3693581226691287"},"_hasShrinkwrap":false,"deprecated":"Deprecated","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":1617946959138,"_cnpm_publish_time":1617946959138,"dist-tags":{"latest":"3.0.0"}}