diff options
author | 2022-07-18 01:00:23 -0400 | |
---|---|---|
committer | 2022-07-17 22:00:23 -0700 | |
commit | a00380c7c2a8edf93370d17eb583e5fe98ea3167 (patch) | |
tree | d42f63eb3e942eef9264e4d98f24668275522f3e | |
parent | 2ef7a123837d1b404fb307af70ceda02542d0590 (diff) | |
download | bun-a00380c7c2a8edf93370d17eb583e5fe98ea3167.tar.gz bun-a00380c7c2a8edf93370d17eb583e5fe98ea3167.tar.zst bun-a00380c7c2a8edf93370d17eb583e5fe98ea3167.zip |
url.js use util_isString (#772)
-rw-r--r-- | src/node-fallbacks/url.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node-fallbacks/url.js b/src/node-fallbacks/url.js index fcc8b4db4..10f1b889a 100644 --- a/src/node-fallbacks/url.js +++ b/src/node-fallbacks/url.js @@ -141,7 +141,7 @@ function urlParse(url, parseQueryString, slashesDenoteHost) { } Url.prototype.parse = function (url, parseQueryString, slashesDenoteHost) { - if (!isString(url)) { + if (!util_isString(url)) { throw new TypeError("Parameter 'url' must be a string, not " + typeof url); } @@ -401,7 +401,7 @@ function urlFormat(obj) { // If it's an obj, this is a no-op. // this way, you can call url_format() on strings // to clean up potentially wonky urls. - if (isString(obj)) obj = urlParse(obj); + if (util_isString(obj)) obj = urlParse(obj); if (!(obj instanceof Url)) return Url.prototype.format.call(obj); return obj.format(); } @@ -482,7 +482,7 @@ function urlResolveObject(source, relative) { } Url.prototype.resolveObject = function (relative) { - if (isString(relative)) { + if (util_isString(relative)) { var rel = new Url(); rel.parse(relative, false, true); relative = rel; |