{"version":3,"file":"prepend-https.cjs","names":["prependHTTP"],"sources":["../src/prepend-https.ts"],"sourcesContent":["import { prependHTTP } from './prepend-http';\n\n/**\n * Prepends \"https://\" to a url, if it looks like something that is meant to be a TLD.\n *\n * Note: this will not replace \"http://\" with \"https://\".\n *\n * @param url The URL to test.\n *\n * @example\n * ```js\n * const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org\n * ```\n *\n * @return The updated URL.\n */\nexport function prependHTTPS( url: string ): string {\n\tif ( ! url ) {\n\t\treturn url;\n\t}\n\n\t// If url starts with http://, return it as is.\n\tif ( url.startsWith( 'http://' ) ) {\n\t\treturn url;\n\t}\n\n\turl = prependHTTP( url );\n\n\treturn url.replace( /^http:/, 'https:' );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBA,SAAgB,aAAc,KAAsB;CACnD,IAAK,CAAE,KACN,OAAO;CAIR,IAAK,IAAI,WAAY,SAAU,GAC9B,OAAO;CAGR,OAAA,GAAMA,kBAAAA,YAAAA,CAAa,GAAI;CAEvB,OAAO,IAAI,QAAS,UAAU,QAAS;AACxC"}