tibber-api
Version:
Node.js module for connecting to Tibber API and extract data from your connected homes, including realtime data from Tibber Pulse.
12 lines • 502 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.UrlTools = void 0;
/* eslint-disable no-unused-vars */
class UrlTools {
validateUrl(url) {
const regExp = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/;
return new RegExp(regExp).test(url);
}
}
exports.UrlTools = UrlTools;
//# sourceMappingURL=tools.js.map
;