{"version":3,"file":"get-protocol.mjs","names":[],"sources":["../src/get-protocol.ts"],"sourcesContent":["/**\n * Returns the protocol part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const protocol1 = getProtocol( 'tel:012345678' ); // 'tel:'\n * const protocol2 = getProtocol( 'https://wordpress.org' ); // 'https:'\n * ```\n *\n * @return  The protocol part of the URL.\n */\nexport function getProtocol( url: string ): string | void {\n\tconst matches = /^([^\\s:]+:)/.exec( url );\n\tif ( matches ) {\n\t\treturn matches[ 1 ];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,YAAa,KAA6B;CACzD,MAAM,UAAU,cAAc,KAAM,GAAI;CACxC,IAAK,SACJ,OAAO,QAAS;AAElB"}