3 lines
109 B
JavaScript

/** @param {string} str */
export const isStrLink = (str) => RegExp(/^(https?:\/\/|file:\/\/)/gm).test(str);