signal-desktop/ts/html/index.ts

12 lines
410 B
TypeScript
Raw Normal View History

2018-04-10 13:33:46 -04:00
import linkTextInternal from '../../js/modules/link_text';
export const linkText = (value: string): string =>
linkTextInternal(value, { target: '_blank' });
export const replaceLineBreaks = (value: string): string =>
value.replace(/\r?\n/g, '<br>');
// NOTE: How can we use `lodash/fp` `compose` with type checking?
export const render = (value: string): string =>
replaceLineBreaks(linkText(value));