summaryrefslogtreecommitdiff
path: root/src/sjs.mjs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/sjs.mjs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sjs.mjs b/src/sjs.mjs
index e9da7fc..aae85a7 100644
--- a/src/sjs.mjs
+++ b/src/sjs.mjs
@@ -461,11 +461,27 @@ const mappings = {
};
},
},
+ tap: {
+ qjs: () => null,
+ node: async () => {
+ const util = await import("node:util");
+ return x => {
+ console.log(util.inspect(x, {
+ depth: null,
+ colors: true,
+ }));
+ return x;
+ };
+ },
+ deno: () => null,
+ browser: () => null,
+ },
};
export const JSImpl = getJSImpl();
export const exit = await mappings.exit[ JSImpl]?.();
export const ARGV = await mappings.ARGV[ JSImpl]?.();
+export const tap = await mappings.tap[ JSImpl]?.();
const tconf = await mappings.tconf[JSImpl]?.();
export const runTests = async tests => {