chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
const DOMAIN_REGEXP = /^([0-9a-zA-Z-]{1,}\.)+([a-zA-Z]{2,})$/;
|
||||
|
||||
export function isValidUrl(url: string): boolean {
|
||||
@@ -21,7 +21,7 @@ export function isValidUrl(url: string): boolean {
|
||||
// cp-disable-next-line
|
||||
const urlObject = new URL(`https://${url}`);
|
||||
return DOMAIN_REGEXP.test(urlObject.hostname);
|
||||
// eslint-disable-next-line @coze-arch/use-error-in-catch -- 根据函数功能无需 throw error
|
||||
// eslint-disable-next-line @coze-arch/use-error-in-catch -- no need to throw error according to function function
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user