UNPKG

@liveblocks/react-ui

Version:

A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.

26 lines (23 loc) 756 B
'use strict'; function isCommentBodyText(element) { return !("type" in element) && "text" in element && typeof element.text === "string"; } function isCommentBodyMention(element) { return "type" in element && element.type === "mention"; } function isCommentBodyLink(element) { return "type" in element && element.type === "link"; } function toAbsoluteUrl(url) { if (url.startsWith("http://") || url.startsWith("https://")) { return url; } else if (url.startsWith("www.")) { return "https://" + url; } return; } exports.isCommentBodyLink = isCommentBodyLink; exports.isCommentBodyMention = isCommentBodyMention; exports.isCommentBodyText = isCommentBodyText; exports.toAbsoluteUrl = toAbsoluteUrl; //# sourceMappingURL=utils.cjs.map