@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
2 lines (1 loc) • 603 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});const t=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/,e=t=>{if("link"!==t.type&&"autolink"!==t.type||(null===t.target&&(t.target="_blank"),null===t.title&&(t.title=t.url)),t.children&&t.children.length>0)for(let r=0;r<t.children.length;r++)e(t.children[r])};exports.convertNodes=t=>{const r=JSON.parse(JSON.stringify(t));return e(r.root),r},exports.traverseAndModifyLinks=e,exports.validateUrl=e=>"https://"===e||t.test(e);