3.0.0 • Published 4 years ago

p-finally v3.0.0

Weekly downloads
24,388,655
License
MIT
Repository
github
Last release
4 years ago

p-finally

Promise#finally() ponyfill - Invoked when the promise is settled regardless of outcome

Useful for cleanup.

Install

$ npm install p-finally

Usage

import pFinally from 'p-finally';

const directory = createTempDirectory();

await pFinally(write(directory), () => {
	cleanup(directory);
});

API

pFinally(promise, onFinally?)

Returns a Promise.

onFinally

Type: Function

Note: Throwing or returning a rejected promise will reject promise with the rejection reason.

Related

  • p-try - Promise.try() ponyfill - Starts a promise chain
  • More…

@megasaur/symlink-dependencies@megasaur/bootstrap@megasaur/publish@essent/lernaarchetype-librarycomponennenttvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-imagern-send-smsspecify-importsbabel-specify-imports@icanpm/api-masterfoshata-markdown@cashremit/cr-streamline-iconsreact-native-template-rfbaseairscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfdeneme323112@texttree/demo-bsa-reference-rcl@ntt_app/react-native-custom-notificationreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modbitgetreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@l1nyanm1ng/react-picture-viewercthpb-plugin-social@open-containers-manager/cli@olivervorasai/sliderreact-native-printer-brothersrn-pdf-reader-offlinereact-native-shekhar-bridge-testcogoportutilsdyx-reacttalent-to-vite-cliwilscanner@oiti/documentoscopy-react-native@mink-opn/build-tokensquoc-testreact-native-slider-kfunblock-block-save-variables@saaspe/componentsplginexpand-react-bridge@everything-registry/sub-chunk-2396p149-tabletest-popupsgriffin-ui-librarytailwind-vector-effectsyncbackbasestest-carosello-campustest-library-123test-haptik-libtest-npm-jjmessiwinx-form-winxwith-open-fileweb-elements-iconsvue-button-test1webchewoven-challenge-deploywifi_configuration_packagern-tm-notifyrn-use-modal-hookrn-counter-demorn-session-multiplier-demorn_unique_device_idrnttlocksharingcomponent2samc2samc3samc4samc5sam-carouselsay-thankssciadvfilesresponsis-gantt-task-reactresponsive-react-appreikamoon-string-library-aarn-adyen-dropinrn-my-libraryrn-pay-sdksuperset-plugin-chart-hello-world2supercluster-googlemaps-adapter-clonestechfox-icontechfox-react-featherstories-react-bdspotify-ds-sestp-cdksearch-input-reactsearch-list-reactsequelcomponentreact-native-video-typoreact-native-wtfreact-native-version-app
3.0.0

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.0

8 years ago