summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal/console/constructor.mjs
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-12-19 15:05:49 +0900
committerGitHub <noreply@github.com>2023-12-19 15:05:49 +0900
commit68241234faa4715708010b75744bbfa2bb0cc40a (patch)
treef3d50b8456b66097905ea14a69246873b690d920 /ext/node/polyfills/internal/console/constructor.mjs
parent476f5d3deb2f1f4cba5371fdc803540cca47ea11 (diff)
fix(console): inspect for `{Set,Map}Iterator` and `Weak{Set,Map}` (#21554)
Diffstat (limited to 'ext/node/polyfills/internal/console/constructor.mjs')
-rw-r--r--ext/node/polyfills/internal/console/constructor.mjs8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/node/polyfills/internal/console/constructor.mjs b/ext/node/polyfills/internal/console/constructor.mjs
index afa18bb97..e9160cf70 100644
--- a/ext/node/polyfills/internal/console/constructor.mjs
+++ b/ext/node/polyfills/internal/console/constructor.mjs
@@ -4,6 +4,9 @@
// TODO(petamoriken): enable prefer-primordials for node polyfills
// deno-lint-ignore-file prefer-primordials
+import { core } from "ext:core/mod.js";
+const ops = core.ops;
+
// Mock trace for now
const trace = () => {};
import {
@@ -17,7 +20,6 @@ import {
validateInteger,
validateObject,
} from "ext:deno_node/internal/validators.mjs";
-import { previewEntries } from "ext:deno_node/internal_binding/util.ts";
import { Buffer } from "node:buffer";
const { isBuffer } = Buffer;
import {
@@ -500,7 +502,7 @@ const consoleMethods = {
let isKeyValue = false;
let i = 0;
if (mapIter) {
- const res = previewEntries(tabularData, true);
+ const res = ops.op_preview_entries(tabularData, true);
tabularData = res[0];
isKeyValue = res[1];
}
@@ -535,7 +537,7 @@ const consoleMethods = {
const setIter = isSetIterator(tabularData);
if (setIter) {
- tabularData = previewEntries(tabularData);
+ tabularData = ops.op_preview_entries(tabularData, false);
}
const setlike = setIter || mapIter || isSet(tabularData);