Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getActiveTab,
T.map(flow(
O.chain(tab => OT.fromNullable(tab.title, tab.url)),
O.map(([title, url]) => [{ title, url }]),
O.chain(NEA.fromArray),
)),
);
case ContextMenuEntry.SendLink: return pipe(
u,
O.map(url => [{ url, title: url }]),
O.chain(NEA.fromArray),
TO.fromOption,
);
default: return TO.none;
}
};