javascript-barcode-reader
Version:
Simple & Fast Barcode decoder for Browser and Node.js
11 lines • 358 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUrl = void 0;
function isUrl(s) {
const regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-/]))?/;
if (s.startsWith('#'))
return false;
return regexp.test(s);
}
exports.isUrl = isUrl;
//# sourceMappingURL=isUrl.js.map