UNPKG

@n3okill/utils

Version:
13 lines 461 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isUrlRelative = isUrlRelative; /** * Returns a value indicating whether a URL is relative. * A relative URL does not have host info part. * @param {string} url - the URL to be checked * @return {boolean} whether the URL is relative */ function isUrlRelative(url) { return !url.startsWith("//") && url.indexOf("://") === -1; } //# sourceMappingURL=isUrlRelative.js.map