summaryrefslogtreecommitdiff
path: root/op_crates/web/12_location.js
diff options
context:
space:
mode:
Diffstat (limited to 'op_crates/web/12_location.js')
-rw-r--r--op_crates/web/12_location.js18
1 files changed, 4 insertions, 14 deletions
diff --git a/op_crates/web/12_location.js b/op_crates/web/12_location.js
index add2e0e38..6c99bc23a 100644
--- a/op_crates/web/12_location.js
+++ b/op_crates/web/12_location.js
@@ -166,7 +166,7 @@
enumerable: true,
},
[Symbol.for("Deno.customInspect")]: {
- value: function () {
+ value: function (inspect) {
const object = {
hash: this.hash,
host: this.host,
@@ -178,12 +178,7 @@
protocol: this.protocol,
search: this.search,
};
- if (typeof globalThis?.Deno?.inspect == "function") {
- return `Location ${Deno.inspect(object)}`;
- }
- return `Location { ${
- Object.entries(object).map(([k, v]) => `${k}: ${v}`).join(", ")
- } }`;
+ return `${this.constructor.name} ${inspect(object)}`;
},
},
});
@@ -328,7 +323,7 @@
configurable: true,
},
[Symbol.for("Deno.customInspect")]: {
- value: function () {
+ value: function (inspect) {
const object = {
hash: this.hash,
host: this.host,
@@ -340,12 +335,7 @@
protocol: this.protocol,
search: this.search,
};
- if (typeof globalThis?.Deno?.inspect == "function") {
- return `WorkerLocation ${Deno.inspect(object)}`;
- }
- return `WorkerLocation { ${
- Object.entries(object).map(([k, v]) => `${k}: ${v}`).join(", ")
- } }`;
+ return `${this.constructor.name} ${inspect(object)}`;
},
},
});