How to use the already.Finally function in already

To help you get started, we’ve selected a few already examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github grantila / fetch-h2 / test / fetch-h2 / httpbin.ts View on Github external
return async ( ) =>
		{
			const { fetch, disconnectAll } = context( {
				httpsProtocols: protos,
			} );

			await fn( fetch ).then( ...Finally( disconnectAll ) );
		};
	}
github grantila / fetch-h2 / dist / lib / fetch.js View on Github external
});
            if (!endStream)
                await req.readable()
                    .then(readable => {
                    readable.pipe(stream);
                });
            return response;
        });
    }
    return Promise.race([
        signalPromise,
        timeoutInfo && timeoutInfo.promise,
        doFetch(),
    ]
        .filter(promise => promise))
        .then(...already_1.Finally(cleanup));
}
function fetch(session, input, init) {

already

Promise extensions; map, filter, etc

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis