Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const getActiveTheme = () => browser.storage.sync.get().then(res => isTheme(res.theme)
? Just(res.theme)
: Nothing,
);
public static fromNullable(fst: ADTNullable, snd: ADTNullable<s>): Maybe> {
return fst !== null && fst !== undefined && snd !== null && snd !== undefined
? Just(Tuple(fst, snd))
: Nothing;
}
</s>
onGroupClick={(id) => {
props.setGroup(Just(id));
props.setPage(Page.StagedGroup);
}}
exit={props.setPage.bind(null, Page.Search)}
onEditBookmark={(id) => {
props.onEditBookmark(Just(id));
props.setPage(Page.EditStagedBookmark);
}}
onDeleteBookmark={(id) => {
Just: s => Just(Tuple(f, s)),
Nothing: () => Nothing,
export const checkRuntimeErrors = () => Either.encase(() => {
const errMsg = browser.runtime.lastError && browser.runtime.lastError.message;
if (errMsg) throw new Error(errMsg);
});
.then(tabs => liftMaybe(List.at(0, tabs))));
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,
});