How to use purify-ts - 8 common examples

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 / modules / theme.ts View on Github external
export const getActiveTheme = () => browser.storage.sync.get().then(res => isTheme(res.theme)
	? Just(res.theme)
	: Nothing,
);
github SamHH / bukubrow-webext / src / modules / adt.ts View on Github external
public static fromNullable<F, S>(fst: ADTNullable<F>, snd: ADTNullable<S>): Maybe<Tuple<F, S>> {
		return fst !== null && fst !== undefined && snd !== null && snd !== undefined
			? Just(Tuple(fst, snd))
			: Nothing;
	}
github SamHH / bukubrow-webext / src / containers / staged-groups-list / container.tsx View on Github external
onGroupClick={(id) => {
			props.setGroup(Just(id));
			props.setPage(Page.StagedGroup);
		}}
		exit={props.setPage.bind(null, Page.Search)}
github SamHH / bukubrow-webext / src / containers / staged-group-bookmarks-list / container.tsx View on Github external
onEditBookmark={(id) => {
			props.onEditBookmark(Just(id));
			props.setPage(Page.EditStagedBookmark);
		}}
		onDeleteBookmark={(id) => {
github SamHH / bukubrow-webext / src / modules / adt.ts View on Github external
				Just: s => Just(Tuple(f, s)),
				Nothing: () => Nothing,
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);
});
github SamHH / bukubrow-webext / src / containers / search-controls / container.tsx View on Github external
const mapStateToProps = (state: AppState) => ({
	searchFilter: state.input.searchFilter,
	searchEnabled: NonEmptyList.isNonEmpty(state.bookmarks.bookmarks),
	hasBinaryComms: state.user.hasBinaryComms,
	numFilteredBookmarks: getUnlimitedFilteredBookmarks(state).length,
	numStagedItems: state.bookmarks.stagedBookmarksGroups.length,
});

purify-ts

Functional programming standard library for TypeScript

ISC
Latest version published 3 months ago

Package Health Score

72 / 100
Full package analysis

Similar packages