How to use the purify-ts/Either.Either.encase function in purify-ts

To help you get started, we’ve selected a few purify-ts 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 SamHH / bukubrow-webext / webextension / src / comms / shared.ts View on Github external
export const checkRuntimeErrors = () => Either.encase(() => {
	const errMsg = browser.runtime.lastError && browser.runtime.lastError.message;

	if (errMsg) throw new Error(errMsg);
});

purify-ts

Functional programming standard library for TypeScript

ISC
Latest version published 4 months ago

Package Health Score

77 / 100
Full package analysis